File size: 768 Bytes
c60cafd
 
 
 
 
 
 
26bf156
 
 
 
 
 
 
 
 
 
 
 
 
c60cafd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.7
EXPOSE 8501
WORKDIR /app
# Docker Copy is a directive or instruction that is used in a Dockerfile to copy files or directories from local machine to the container filesystem where the source is the local path and destination is the path in the container filesystem. We can specify the destination as an absolute path or relative to the WORKDIR directive if the WORKDIR directive is defined in the Dockerfile.
COPY requirements.txt ./requirements.txt
RUN pip3 install -r requirements.txt
RUN python -m spacy download en_core_web_sm --default-timeout=900

# User
RUN useradd -m -u 1000 user
USER user
ENV HOME /home/user
ENV PATH $HOME/.local/bin:$PATH
WORKDIR $HOME
RUN mkdir app
WORKDIR $HOME/app

COPY . $HOME/app

EXPOSE 8501
CMD streamlit run app.py