Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +20 -17
Dockerfile
CHANGED
|
@@ -1,17 +1,20 @@
|
|
| 1 |
-
FROM python:3.11.8-slim
|
| 2 |
-
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
#
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.8-slim
|
| 2 |
+
|
| 3 |
+
# Install wget (and other dependencies if needed)
|
| 4 |
+
RUN apt-get update && apt-get install -y wget && apt-get install -y git && apt-get clean
|
| 5 |
+
|
| 6 |
+
# Set working directory
|
| 7 |
+
WORKDIR /app
|
| 8 |
+
|
| 9 |
+
# Install dependencies
|
| 10 |
+
COPY requirements.txt .
|
| 11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
+
|
| 13 |
+
# Copy the FastAPI app
|
| 14 |
+
COPY ./app /app
|
| 15 |
+
|
| 16 |
+
# Expose Hugging Face-required port
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# Run the app
|
| 20 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|