thomasm6m6 commited on
Commit
9345786
·
verified ·
1 Parent(s): b003bf0

Switch to plain FastAPI debug Space

Browse files
Files changed (1) hide show
  1. 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 apt-get update && apt-get install -y --no-install-recommends curl \
9
- && rm -rf /var/lib/apt/lists/*
 
 
 
10
 
11
- RUN pip install --no-cache-dir "openenv-core[core]==0.2.1" "uvicorn>=0.35.0"
 
 
12
 
 
 
 
 
13
  COPY README.md /app/README.md
14
- COPY minimal_space_app.py /app/minimal_space_app.py
 
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 ["python", "-m", "uvicorn", "minimal_space_app:app", "--host", "0.0.0.0", "--port", "8000"]
 
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"]