MrSiebel585 commited on
Commit
231d9a1
·
1 Parent(s): 0a1f9c3

Switch Space to Streamlit UI entrypoint

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -1,21 +1,21 @@
1
  FROM python:3.11-slim
2
 
3
- # Create user
4
  RUN useradd -m -u 1000 user
5
  USER user
6
  ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
  WORKDIR /app
9
 
10
- # Install deps
11
  COPY --chown=user requirements.txt requirements.txt
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Copy app files
15
  COPY --chown=user . /app
16
 
17
  # Hugging Face requires port 7860
18
  EXPOSE 7860
19
 
20
- # Run Streamlit on port 7860
21
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
1
  FROM python:3.11-slim
2
 
3
+ # Create non-root user
4
  RUN useradd -m -u 1000 user
5
  USER user
6
  ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
  WORKDIR /app
9
 
10
+ # Install dependencies
11
  COPY --chown=user requirements.txt requirements.txt
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy project files
15
  COPY --chown=user . /app
16
 
17
  # Hugging Face requires port 7860
18
  EXPOSE 7860
19
 
20
+ # Run Streamlit as the entrypoint
21
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]