Emil25 commited on
Commit
1c4e0a5
·
verified ·
1 Parent(s): 370aec6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -10
Dockerfile CHANGED
@@ -1,20 +1,25 @@
1
- FROM python:3.9
2
 
3
- WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
6
 
7
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- RUN useradd -m -u 1000 user
10
 
11
- USER user
12
 
13
- ENV HOME=/home/user \
14
- PATH=/home/user/.local/bin:$PATH
15
 
16
- WORKDIR $HOME/app
 
17
 
18
- COPY --chown=user . $HOME/app
 
 
 
 
 
19
 
20
  CMD streamlit run main.py
 
1
+ FROM python:3.10
2
 
3
+ EXPOSE 8501
4
 
5
+ USER root
6
 
7
+ WORKDIR /app
8
 
9
+ COPY scripts /app/scripts/
10
 
11
+ COPY main.py /app/
12
 
13
+ COPY requirements.txt /app/
 
14
 
15
+ RUN apt-get update && \
16
+ apt-get install -y python3-pip python3-venv
17
 
18
+ RUN python3 -m venv /app/venv
19
+
20
+ ENV PATH="/app/venv/bin:$PATH"
21
+
22
+ RUN pip install --upgrade pip && \
23
+ pip install --no-cache-dir --upgrade -r /app/requirements.txt
24
 
25
  CMD streamlit run main.py