Update Dockerfile
Browse files- Dockerfile +2 -11
Dockerfile
CHANGED
@@ -1,28 +1,19 @@
|
|
1 |
-
# Use a slim Python 3.9 base image
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
-
# Prevent Python from writing .pyc files and buffer logs
|
5 |
ENV PYTHONDONTWRITEBYTECODE=1
|
6 |
ENV PYTHONUNBUFFERED=1
|
7 |
|
8 |
-
# Set working directory inside the container
|
9 |
WORKDIR /app
|
10 |
|
11 |
-
# Copy all files to the container
|
12 |
COPY . .
|
13 |
|
14 |
-
# Install all required Python packages
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
-
|
17 |
-
# Optional: install dotenv again to be safe
|
18 |
RUN pip install python-dotenv
|
19 |
|
20 |
-
# Expose the correct port Hugging Face Spaces expects
|
21 |
EXPOSE 7860
|
22 |
|
23 |
-
# Add a health check so Hugging Face knows the app is running
|
24 |
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1
|
25 |
|
26 |
-
|
27 |
-
|
28 |
|
|
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
|
|
3 |
ENV PYTHONDONTWRITEBYTECODE=1
|
4 |
ENV PYTHONUNBUFFERED=1
|
5 |
|
|
|
6 |
WORKDIR /app
|
7 |
|
|
|
8 |
COPY . .
|
9 |
|
|
|
10 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
11 |
RUN pip install python-dotenv
|
12 |
|
|
|
13 |
EXPOSE 7860
|
14 |
|
|
|
15 |
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1
|
16 |
|
17 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
|
18 |
+
|
19 |
|