Entz commited on
Commit
e67b323
·
verified ·
1 Parent(s): 7880624

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -2,6 +2,9 @@
2
  FROM python:3.10-slim
3
 
4
  WORKDIR /app
 
 
 
5
 
6
  # (Optional) system deps if you need them; safe to remove if not needed
7
  RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
@@ -16,6 +19,7 @@ COPY . /app
16
  # Do NOT set STREAMLIT_SERVER_PORT here.
17
  # Spaces will inject $PORT at runtime.
18
 
 
19
  # Start Streamlit on the port Spaces provides, and bind to 0.0.0.0
20
  # CMD ["bash", "-lc", "streamlit run /app/frontend.py --server.port $PORT --server.address 0.0.0.0"]
21
  # CMD ["sh", "-c", "streamlit run /app/frontend.py --server.port $PORT --server.address 0.0.0.0"]
 
2
  FROM python:3.10-slim
3
 
4
  WORKDIR /app
5
+ # tells the system to treat /app as the "home" directory, so Streamlit will create /app/.streamlit instead of /.streamlit.
6
+ # /app is already writable as root, so no permission issues.
7
+ ENV HOME=/app
8
 
9
  # (Optional) system deps if you need them; safe to remove if not needed
10
  RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
 
19
  # Do NOT set STREAMLIT_SERVER_PORT here.
20
  # Spaces will inject $PORT at runtime.
21
 
22
+
23
  # Start Streamlit on the port Spaces provides, and bind to 0.0.0.0
24
  # CMD ["bash", "-lc", "streamlit run /app/frontend.py --server.port $PORT --server.address 0.0.0.0"]
25
  # CMD ["sh", "-c", "streamlit run /app/frontend.py --server.port $PORT --server.address 0.0.0.0"]