alifyad commited on
Commit
566a890
·
verified ·
1 Parent(s): f0ef8af

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ######################## WRITE YOUR DOCKERFILE SCRIPT HERE #########################
3
+ # Fill in the base image with the correct Python version (e.g., python:3.9)
4
+ FROM python:3.9
5
+
6
+ # Fill in the username to be created (e.g., user)
7
+ RUN useradd -m -u 1000 user
8
+
9
+ # Blank #3: Specify the username for subsequent commands (e.g., user)
10
+ USER user
11
+
12
+ # Fill in the username in the PATH environment variable (e.g., user)
13
+ ENV PATH=""/home/user/.local/bin:$PATH""
14
+
15
+ # Set working directory
16
+ WORKDIR /app
17
+
18
+ # Use the same username for file ownership when copying requirements (e.g., user)
19
+ COPY --chown=user ./requirements.txt requirements.txt
20
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
21
+
22
+ # Use the same username for file ownership when copying the app files (e.g., user)
23
+ COPY --chown=user . /app
24
+
25
+ # Start the Streamlit app on port 7860, the default port expected by Spaces
26
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]