Vaddiritz commited on
Commit
2246a98
·
verified ·
1 Parent(s): 55aa3c4

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Use a minimal base image with Python 3.9 installed
3
+ FROM python:3.9
4
+
5
+ # Set the working directory inside the container to /app
6
+ WORKDIR /app
7
+
8
+ # Copy all files from the current directory on the host to the container's /app directory
9
+ COPY . .
10
+
11
+ # Install Python dependencies listed in requirements.txt
12
+ RUN pip3 install -r requirements.txt
13
+
14
+ # Create non-root user
15
+ RUN useradd -m -u 1000 user
16
+ USER user
17
+ ENV HOME=/home/user \
18
+ PATH=/home/user/.local/bin:$PATH
19
+
20
+ WORKDIR $HOME/app
21
+ COPY --chown=user . $HOME/app
22
+
23
+ # Run the Streamlit app
24
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]