Spaces:
Paused
Paused
Update Dockerfile
Browse files- 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
|
| 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 -
|
| 33 |
|
| 34 |
COPY . .
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
RUN
|
| 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"]
|