Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
# set working directory
|
|
@@ -12,10 +13,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 12 |
COPY requirements.txt ./
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# copy
|
|
|
|
| 16 |
|
| 17 |
# expose Hugging Face default port
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
#
|
| 21 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
# Dockerfile for Hugging Face Space (exposes port 7860)
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
# set working directory
|
|
|
|
| 13 |
COPY requirements.txt ./
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# copy application code (including app.py, templates/, static/)
|
| 17 |
+
COPY . ./
|
| 18 |
|
| 19 |
# expose Hugging Face default port
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
# start the FastAPI app via Uvicorn on port 7860
|
| 23 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|