huathedev commited on
Commit
05e392c
·
1 Parent(s): f9cb6bf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -19
Dockerfile CHANGED
@@ -1,31 +1,26 @@
1
  FROM python:3.9
2
 
3
- WORKDIR $HOME/app
4
 
5
- COPY ./requirements.txt /app/requirements.txt
6
  RUN apt-get update && apt-get upgrade -y && apt-get install gcc -y
7
- RUN pip3 install --no-cache-dir -r /app/requirements.txt
8
- RUN pip3 install numpy
9
- RUN pip3 install cython==0.29.21
10
 
11
  RUN apt-get update
12
  RUN apt-get install --reinstall build-essential -y
13
- RUN pip3 install pygco==0.0.16
14
 
15
- # User
16
  RUN useradd -m -u 1000 user
 
17
  USER user
18
- ENV HOME /home/user
19
- ENV PATH $HOME/.local/bin:$PATH
20
 
21
- WORKDIR $HOME
22
- RUN mkdir app
 
23
  WORKDIR $HOME/app
24
- COPY . $HOME/app
25
-
26
- EXPOSE 7860
27
- CMD streamlit run Introduction.py \
28
- --server.headless true \
29
- --server.enableCORS false \
30
- --server.enableXsrfProtection false \
31
- --server.fileWatcherType none
 
1
  FROM python:3.9
2
 
3
+ WORKDIR /code
4
 
5
+ COPY ./requirements.txt /code/requirements.txt
6
  RUN apt-get update && apt-get upgrade -y && apt-get install gcc -y
7
+ RUN pip install --no-cache-dir -r /code/requirements.txt
8
+ RUN pip install numpy
9
+ RUN pip install cython==0.29.21
10
 
11
  RUN apt-get update
12
  RUN apt-get install --reinstall build-essential -y
13
+ RUN pip install pygco==0.0.16
14
 
 
15
  RUN useradd -m -u 1000 user
16
+
17
  USER user
 
 
18
 
19
+ ENV HOME=/home/user \
20
+ PATH=/home/user/.local/bin:$PATH
21
+
22
  WORKDIR $HOME/app
23
+
24
+ COPY --chown=user . $HOME/app
25
+
26
+ CMD ["streamlit", "run", "Introduction.py", "--server.port=7860", "--server.address=0.0.0.0"]