Nguyen Thai Thao Uyen commited on
Commit
a5d73b4
·
1 Parent(s): b2fdeb4

Update Dockerfile to use venv

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -1,5 +1,9 @@
1
  FROM python:3.9
2
 
 
 
 
 
3
  WORKDIR /code
4
 
5
  COPY ./requirements.txt /code/requirements.txt
@@ -14,6 +18,9 @@ RUN pip install --upgrade pip \
14
 
15
  COPY . .
16
 
 
 
 
17
  EXPOSE 7860
18
 
19
  CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9
2
 
3
+ # Set environment variables
4
+ ENV VIRTUAL_ENV=/opt/venv
5
+ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
6
+
7
  WORKDIR /code
8
 
9
  COPY ./requirements.txt /code/requirements.txt
 
18
 
19
  COPY . .
20
 
21
+ # Set permissions
22
+ RUN mkdir cache && chmod 777 cache
23
+
24
  EXPOSE 7860
25
 
26
  CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]