abhishekrs4 commited on
Commit
e191ffa
1 Parent(s): 7585189

added dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.8.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # install linux package dependencies
6
+ RUN apt-get -y update
7
+
8
+ # can copy files only from current working directory where docker builds
9
+ # cannot copy files from arbitrary directories
10
+
11
+ COPY ./requirements.txt .
12
+
13
+ RUN pip install --no-cache-dir -r requirements.txt
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
+
25
+ COPY ./frontend.py $HOME/app
26
+
27
+ EXPOSE 8501
28
+
29
+ CMD streamlit run frontend.py \
30
+ --server.headless true \
31
+ --server.enableCORS false \
32
+ --server.enableXsrfProtection false \
33
+ --server.fileWatcherType none