Spaces:
Runtime error
Runtime error
Switch to plain FastAPI debug Space
Browse files- Dockerfile +15 -6
Dockerfile
CHANGED
|
@@ -3,17 +3,26 @@ FROM python:3.11-slim
|
|
| 3 |
WORKDIR /app
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 5 |
ENV PYTHONUNBUFFERED=1
|
| 6 |
-
ENV ENABLE_WEB_INTERFACE=true
|
| 7 |
|
| 8 |
-
RUN
|
| 9 |
-
&&
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
RUN pip install
|
|
|
|
|
|
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
COPY README.md /app/README.md
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=10 \
|
| 17 |
CMD curl -f http://localhost:8000/health || exit 1
|
| 18 |
|
| 19 |
-
CMD ["
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 5 |
ENV PYTHONUNBUFFERED=1
|
|
|
|
| 6 |
|
| 7 |
+
RUN echo '[build] apt-get begin' \
|
| 8 |
+
&& apt-get update \
|
| 9 |
+
&& apt-get install -y --no-install-recommends curl \
|
| 10 |
+
&& rm -rf /var/lib/apt/lists/* \
|
| 11 |
+
&& echo '[build] apt-get end'
|
| 12 |
|
| 13 |
+
RUN echo '[build] pip install begin' \
|
| 14 |
+
&& pip install --no-cache-dir fastapi uvicorn \
|
| 15 |
+
&& echo '[build] pip install end'
|
| 16 |
|
| 17 |
+
RUN echo '[build] workdir contents before copy' && pwd && ls -la
|
| 18 |
+
|
| 19 |
+
COPY minimal_static_app.py /app/minimal_static_app.py
|
| 20 |
+
COPY scripts/start_minimal_space.sh /app/scripts/start_minimal_space.sh
|
| 21 |
COPY README.md /app/README.md
|
| 22 |
+
|
| 23 |
+
RUN echo '[build] copied files' && ls -la /app && ls -la /app/scripts
|
| 24 |
|
| 25 |
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=10 \
|
| 26 |
CMD curl -f http://localhost:8000/health || exit 1
|
| 27 |
|
| 28 |
+
CMD ["/app/scripts/start_minimal_space.sh"]
|