chouchouvs commited on
Commit
7a796bc
·
verified ·
1 Parent(s): fa2de66

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -5
Dockerfile CHANGED
@@ -1,9 +1,22 @@
 
1
  FROM python:3.10-slim
2
- WORKDIR /app
3
 
4
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 
 
5
 
6
- COPY entrypoint.sh /app/entrypoint.sh
7
- RUN chmod +x /app/entrypoint.sh
 
 
8
 
9
- CMD ["/app/entrypoint.sh"]
 
 
 
 
 
 
 
 
 
 
1
+ # ---- Dockerfile (runtime-clone pattern)
2
  FROM python:3.10-slim
 
3
 
4
+ # System deps
5
+ RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && \
6
+ rm -rf /var/lib/apt/lists/*
7
 
8
+ # A writable workspace for the runtime clone
9
+ ENV WORKSPACE=/workspace
10
+ RUN mkdir -p ${WORKSPACE}
11
+ WORKDIR ${WORKSPACE}
12
 
13
+ # Keep pip quiet + no cache
14
+ ENV PIP_NO_CACHE_DIR=1 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
15
+
16
+ # Entrypoint script
17
+ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
18
+ RUN chmod +x /usr/local/bin/entrypoint.sh
19
+
20
+ # FastAPI runner
21
+ EXPOSE 7860
22
+ CMD ["/usr/local/bin/entrypoint.sh"]