Spaces:
Paused
Paused
File size: 1,200 Bytes
957d962 91eceac a9b644c 91eceac dca86d6 41d2ab5 22e92c8 a9b644c 22e92c8 a9b644c 91eceac 22e92c8 41d2ab5 9f0bc63 53bd3fe 97678d4 9f0bc63 b69e6bc dca86d6 9f0bc63 97678d4 9f0bc63 680fb59 91eceac 680fb59 9f0bc63 91eceac 9f0bc63 22e92c8 b69e6bc 9f0bc63 a9b644c 43afadc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | FROM cirrusci/android-sdk:33
USER root
ENV DEBIAN_FRONTEND=noninteractive
ENV TAR_OPTIONS="--no-same-owner --no-same-permissions"
# Install Python, Java 17, apksigner, zipalign
RUN apt-get update && \
apt-get install -y --no-install-recommends python3-pip openjdk-17-jdk apksigner zipalign && \
rm -rf /var/lib/apt/lists/*
# Set JDK path
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV PATH=${PATH}:${JAVA_HOME}/bin:/opt/flutter/bin
# Shallow clone Flutter
RUN git clone https://github.com/flutter/flutter.git -b stable --depth 1 /opt/flutter && \
git config --global --add safe.directory /opt/flutter
ENV FLUTTER_HOME=/opt/flutter
# Precache Android artifacts
RUN flutter config --no-analytics && \
flutter precache --android
WORKDIR /app
# Requirements install
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt || pip3 install --no-cache-dir --break-system-packages -r requirements.txt
COPY . .
# Permissions
RUN chmod -R 777 /app /opt/flutter
EXPOSE 7860
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false", "--server.maxUploadSize=1000"] |