tracinginsights commited on
Commit
a781d27
1 Parent(s): 8598d58

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -2
Dockerfile CHANGED
@@ -1,8 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM python:3.10.9
2
 
 
 
3
  WORKDIR /code
4
 
5
- RUN mkdir /code/cache
 
 
6
 
7
  COPY ./requirements.txt /code/requirements.txt
8
 
@@ -10,4 +28,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
 
11
  COPY . .
12
 
13
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # FROM python:3.10.9
2
+
3
+ # WORKDIR /code
4
+
5
+ # RUN mkdir /code/cache
6
+
7
+ # COPY ./requirements.txt /code/requirements.txt
8
+
9
+ # RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
+
11
+ # COPY . .
12
+
13
+ # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
14
+
15
  FROM python:3.10.9
16
 
17
+ USER root
18
+
19
  WORKDIR /code
20
 
21
+ RUN mkdir /code/cache \
22
+ && chown -R root:root /code/cache \
23
+ && chmod -R 777 /code/cache
24
 
25
  COPY ./requirements.txt /code/requirements.txt
26
 
 
28
 
29
  COPY . .
30
 
31
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]