Akwbw commited on
Commit
b6ae3d8
·
verified ·
1 Parent(s): 9f0bc63

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -8
Dockerfile CHANGED
@@ -10,7 +10,7 @@ RUN apt-get update && \
10
  apt-get clean && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
- # Clone Flutter stable branch directly (avoiding URL download errors)
14
  RUN git clone https://github.com/flutter/flutter.git -b stable --depth 1 /opt/flutter && \
15
  git config --global --add safe.directory /opt/flutter
16
 
@@ -23,19 +23,15 @@ ENV PATH=${PATH}:${JAVA_HOME}/bin:/opt/flutter/bin:/opt/flutter/bin/cache/dart-s
23
  RUN flutter precache --android && \
24
  flutter config --no-analytics
25
 
26
- # Create HF compatible non-root user (UID 1000)
27
- RUN useradd -m -u 1000 user
28
-
29
  WORKDIR /app
30
 
31
  COPY requirements.txt .
32
- RUN pip3 install --no-cache-dir -r requirements.txt || pip3 install --no-cache-dir --break-system-packages -r requirements.txt
33
 
34
  COPY . .
35
 
36
- # Give full permissions to the user
37
- RUN chown -R user:user /app /opt/flutter /opt/android-sdk /tmp
38
- USER user
39
 
40
  EXPOSE 7860
41
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
10
  apt-get clean && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
+ # Clone Flutter stable branch
14
  RUN git clone https://github.com/flutter/flutter.git -b stable --depth 1 /opt/flutter && \
15
  git config --global --add safe.directory /opt/flutter
16
 
 
23
  RUN flutter precache --android && \
24
  flutter config --no-analytics
25
 
 
 
 
26
  WORKDIR /app
27
 
28
  COPY requirements.txt .
29
+ RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt || pip3 install --no-cache-dir -r requirements.txt
30
 
31
  COPY . .
32
 
33
+ # Grant full read/write permissions for all folders
34
+ RUN chmod -R 777 /app /opt/flutter /opt/android-sdk
 
35
 
36
  EXPOSE 7860
37
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]