Upload folder using huggingface_hub
Browse files- Dockerfile +6 -9
Dockerfile
CHANGED
|
@@ -4,17 +4,14 @@ FROM python:3.9-slim
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy
|
| 8 |
COPY . /app
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
COPY model_artifacts /app/model_artifacts
|
| 12 |
-
|
| 13 |
-
# Install any needed packages specified in requirements.txt
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
EXPOSE
|
| 18 |
|
| 19 |
-
# Run the application
|
| 20 |
-
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy everything into /app (includes backend_files and model_artifacts if present)
|
| 8 |
COPY . /app
|
| 9 |
|
| 10 |
+
# Install dependencies
|
|
|
|
|
|
|
|
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Hugging Face Spaces will set the PORT environment variable (default: 7860)
|
| 14 |
+
EXPOSE 7860
|
| 15 |
|
| 16 |
+
# Run the application with Gunicorn, binding to $PORT
|
| 17 |
+
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:${PORT}", "app:app"]
|