kkata commited on
Commit
3cab8a2
·
verified ·
1 Parent(s): 6e1acd8

Upload Dockerfile with huggingface_hub

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