wayne-chi commited on
Commit
932bba5
·
verified ·
1 Parent(s): aee963f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -10,6 +10,10 @@ RUN apt-get update && apt-get install -y \
10
  curl \
11
  && rm -rf /var/lib/apt/lists/*
12
 
 
 
 
 
13
  # Copy requirements first (for better caching)
14
  COPY requirements.txt .
15
 
@@ -28,7 +32,5 @@ RUN ./setup.sh
28
  # Expose Streamlit port
29
  EXPOSE 7860
30
 
31
-
32
- # Expose the port and run your app
33
- EXPOSE 7860
34
  CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
10
  curl \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Create /app and give ownership to the typical HF Spaces user (uid 1000)
14
+ # Also allow read/write/execute for all users (just for runtime flexibility)
15
+ RUN mkdir -p /app && chown -R 1000:1000 /app && chmod -R a+rw /app
16
+
17
  # Copy requirements first (for better caching)
18
  COPY requirements.txt .
19
 
 
32
  # Expose Streamlit port
33
  EXPOSE 7860
34
 
35
+ # Run Streamlit app
 
 
36
  CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]