Spaces:
Sleeping
Sleeping
File size: 1,151 Bytes
ce6b06d 054c489 158caa1 a9a2f3b 4eed04b 054c489 a9a2f3b 4d16323 a9a2f3b 158cda9 a9a2f3b e89adba a9a2f3b 158cda9 054c489 a9a2f3b 054c489 a258596 eef5619 3bdd1d7 eef5619 a258596 a9a2f3b a258596 a89805b a9a2f3b a258596 |
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 |
# syntax=docker/dockerfile:1.4
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install necessary dependencies
RUN apt-get update && apt-get install -y git
# Set Matplotlib configuration directory
ENV MPLCONFIGDIR=/tmp/.matplotlib
RUN mkdir -p /app && chmod -R 777 /app
# Create Matplotlib configuration directory
RUN mkdir -p /tmp/.matplotlib && chmod -R 777 /tmp/.matplotlib
# Clone private repository using mounted secret
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
git clone https://x-access-token:$(cat /run/secrets/GITHUB_TOKEN)@github.com/leoncool23/sci_xg_classify.git .
# Install Python dependencies
RUN pip install -r requirements.txt
EXPOSE 7860
#CMD ["streamlit", "run", "app.py", "--server.port=7860"]
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
# Expose the port Streamlit will run on
#EXPOSE 8051
# Start Streamlit app with appropriate server settings
#CMD ["streamlit", "run", "app.py", "--server.port=8051", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"] |