ugaray96 commited on
Commit
3f01a78
1 Parent(s): 06460af

Adds suggested working Docker

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -3
Dockerfile CHANGED
@@ -1,8 +1,24 @@
1
  FROM python:3.8.9
2
- COPY . /app
3
  WORKDIR /app
4
- RUN apt-get update && xargs -r -a packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
5
- RUN pip3 install --no-cache-dir -r requirements.txt
 
 
 
 
6
  RUN pip3 install --no-cache-dir streamlit==1.10.0
 
 
 
 
 
 
 
 
 
 
 
 
7
  EXPOSE 8501
8
  CMD streamlit run app.py
 
1
  FROM python:3.8.9
2
+
3
  WORKDIR /app
4
+
5
+ COPY ./requirements.txt /app/requirements.txt
6
+ COPY ./packages.txt /app/packages.txt
7
+
8
+ RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
9
+ RUN pip3 install --no-cache-dir -r /app/requirements.txt
10
  RUN pip3 install --no-cache-dir streamlit==1.10.0
11
+
12
+ # User
13
+ RUN useradd -m -u 1000 user
14
+ USER user
15
+ ENV HOME /home/user
16
+ ENV PATH $HOME/.local/bin:$PATH
17
+
18
+ WORKDIR $HOME
19
+ RUN mkdir app
20
+ WORKDIR $HOME/app
21
+ COPY . $HOME/app
22
+
23
  EXPOSE 8501
24
  CMD streamlit run app.py