Percy3822 commited on
Commit
bb6f2d1
·
verified ·
1 Parent(s): 79405ca

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -11
Dockerfile CHANGED
@@ -1,17 +1,12 @@
1
  FROM python:3.10-slim
2
-
3
- RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && \
4
  rm -rf /var/lib/apt/lists/*
5
-
6
  WORKDIR /code
7
-
8
- # deps
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
-
12
- # app + static (IMPORTANT)
13
- COPY app.py /code/app.py
14
- COPY static/ /code/static/
15
-
16
  EXPOSE 7860
17
- CMD ["uvicorn", "app:app", "--host","0.0.0.0","--port","7860"]
 
 
1
  FROM python:3.10-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tini && \
 
3
  rm -rf /var/lib/apt/lists/*
 
4
  WORKDIR /code
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
+ COPY app.py .
8
+ ENV BASE_DIR=/tmp/brain_app
9
+ RUN mkdir -p /tmp/brain_app/files/logs && chmod -R 0777 /tmp/brain_app
 
 
10
  EXPOSE 7860
11
+ ENTRYPOINT ["/usr/bin/tini","--"]
12
+ CMD ["uvicorn","app:app","--host","0.0.0.0","--port","7860"]