File size: 562 Bytes
5d1b722
43c61aa
23e60a5
 
 
43c61aa
be542ab
dc0d6c9
be542ab
ea90fb2
 
23e60a5
2d91db2
ea90fb2
be542ab
 
ea90fb2
be542ab
23e60a5
be542ab
ea90fb2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10-slim

RUN apt-get update && apt-get install -y build-essential curl git && rm -rf /var/lib/apt/lists/*

WORKDIR /app

RUN useradd -m -u 1000 user

USER user
ENV HOME=/home/user
WORKDIR $HOME/app
ENV PATH="$HOME/.local/bin:${PATH}"

# Copy application files
COPY --chown=user requirements.txt $HOME/app/
COPY --chown=user app.py $HOME/app/
COPY --chown=user ./src/ $HOME/app/src/

RUN pip install --user --upgrade pip && pip install --user -r requirements.txt

CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]