tracinginsights commited on
Commit
2d97fc2
1 Parent(s): bf62d6c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -14,13 +14,15 @@
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
 
@@ -29,3 +31,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
29
  COPY . .
30
 
31
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
14
 
15
  FROM python:3.10.9
16
 
 
 
17
  WORKDIR /code
18
 
19
+ RUN apt-get update && apt-get install -y python3-venv
20
+
21
+ RUN python3 -m venv /venv
22
+
23
+ ENV PATH="/venv/bin:$PATH"
24
+
25
+ RUN mkdir /code/cache
26
 
27
  COPY ./requirements.txt /code/requirements.txt
28
 
 
31
  COPY . .
32
 
33
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
34
+