File size: 626 Bytes
94ecfcc
 
 
 
 
 
 
 
 
 
 
52df035
46ad261
 
 
 
 
 
 
94ecfcc
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM python:3.10

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user
WORKDIR /code

COPY --chown=user ./requirements.txt /code/requirements.txt

ENV PATH="/home/user/.local/bin:${PATH}"
USER root

# Install ffmpeg
RUN apt-get update && apt-get install -y ffmpeg

# Switch back to the "user" user
USER user
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY --chown=user . .

# Expose the port on which Streamlit will run
EXPOSE 7860

# Set the entry point for the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port", "7860"]