memex-in commited on
Commit
296b351
·
verified ·
1 Parent(s): 5d01c4a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -1
Dockerfile CHANGED
@@ -2,6 +2,12 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
@@ -12,7 +18,8 @@ RUN apt update
12
  RUN apt install pkg-config cmake libcairo2-dev libpangocairo-1.0-0 python3-cffi python3-cairocffi libpango1.0-dev -y
13
  RUN apt install dpkg -y
14
  RUN dpkg -l | grep libpango1.0-dev
15
- RUN ls
 
16
  COPY requirements.txt ./
17
 
18
  COPY . ./
 
2
 
3
  WORKDIR /app
4
 
5
+ # Create the .streamlit directory and config.toml to disable usage stats
6
+ # This prevents Streamlit from trying to write to a restricted location (like /root/.streamlit or /.streamlit)
7
+ RUN mkdir -p /app/.streamlit && \
8
+ echo "[browser]" > /app/.streamlit/config.toml && \
9
+ echo "gatherUsageStats = false" >> /app/.streamlit/config.toml
10
+
11
  RUN apt-get update && apt-get install -y \
12
  build-essential \
13
  curl \
 
18
  RUN apt install pkg-config cmake libcairo2-dev libpangocairo-1.0-0 python3-cffi python3-cairocffi libpango1.0-dev -y
19
  RUN apt install dpkg -y
20
  RUN dpkg -l | grep libpango1.0-dev
21
+ # RUN ls # No need for this in final Dockerfile
22
+
23
  COPY requirements.txt ./
24
 
25
  COPY . ./