Upload folder using huggingface_hub
Browse files- Dockerfile +12 -8
Dockerfile
CHANGED
|
@@ -8,16 +8,20 @@ ENV PYTHONUNBUFFERED=1 \
|
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
# Copy requirements and install
|
| 11 |
-
COPY requirements.txt .
|
| 12 |
-
RUN pip install --upgrade pip \
|
| 13 |
-
&& pip install -r requirements.txt
|
| 14 |
|
| 15 |
# Copy the rest of the app (app.py, etc.)
|
| 16 |
-
COPY .
|
| 17 |
|
| 18 |
-
# Hugging Face Spaces
|
| 19 |
-
ENV PORT=7860
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
-
# Start Streamlit directly
|
| 23 |
-
CMD ["
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
# Copy requirements and install
|
| 11 |
+
COPY requirements.txt /app/requirements.txt
|
| 12 |
+
RUN pip install --no-cache-dir --upgrade pip \
|
| 13 |
+
&& pip install --no-cache-dir -r /app/requirements.txt
|
| 14 |
|
| 15 |
# Copy the rest of the app (app.py, etc.)
|
| 16 |
+
COPY . /app
|
| 17 |
|
| 18 |
+
# Hugging Face Docker Spaces expose port 7860; we listen on it directly
|
|
|
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
+
# Start Streamlit directly (no bash, use exec form)
|
| 22 |
+
CMD ["streamlit", "run", "app.py",
|
| 23 |
+
"--server.port=7860",
|
| 24 |
+
"--server.address=0.0.0.0",
|
| 25 |
+
"--server.headless=true",
|
| 26 |
+
"--server.enableCORS=false",
|
| 27 |
+
"--server.enableXsrfProtection=false"]
|