Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -7
Dockerfile
CHANGED
|
@@ -1,12 +1,10 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
-
# Dockerfile 🐳😈 (small-ish, but not “tiny” — Python insists on snacks)
|
| 3 |
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 5 |
PYTHONUNBUFFERED=1
|
| 6 |
|
| 7 |
-
# nginx is our “traffic cop” 🚦: /api -> FastAPI, /admin -> Streamlit
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
-
nginx
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
WORKDIR /app
|
|
@@ -14,10 +12,8 @@ COPY app.py /app/app.py
|
|
| 14 |
COPY nginx.conf /etc/nginx/nginx.conf
|
| 15 |
COPY start.sh /app/start.sh
|
| 16 |
|
| 17 |
-
RUN pip install --no-cache-dir fastapi uvicorn streamlit pydantic
|
| 18 |
|
| 19 |
-
# HF Spaces expects something on 7860
|
| 20 |
EXPOSE 7860
|
| 21 |
-
|
| 22 |
RUN chmod +x /app/start.sh
|
| 23 |
CMD ["/app/start.sh"]
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
|
|
|
| 2 |
|
| 3 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 4 |
PYTHONUNBUFFERED=1
|
| 5 |
|
|
|
|
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 7 |
+
nginx \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
WORKDIR /app
|
|
|
|
| 12 |
COPY nginx.conf /etc/nginx/nginx.conf
|
| 13 |
COPY start.sh /app/start.sh
|
| 14 |
|
| 15 |
+
RUN pip install --no-cache-dir fastapi uvicorn streamlit pydantic
|
| 16 |
|
|
|
|
| 17 |
EXPOSE 7860
|
|
|
|
| 18 |
RUN chmod +x /app/start.sh
|
| 19 |
CMD ["/app/start.sh"]
|