FROM python:3.9 ARG GIT_PAT WORKDIR /code RUN apt-get update && \ apt-get install -y --no-install-recommends git curl gpg build-essential ffmpeg && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ apt-get update && \ apt-get install -y git-lfs && \ rm -rf /var/lib/apt/lists/* && \ git lfs install RUN --mount=type=secret,id=GIT_PAT,mode=0444,required=true \ HF_PAT=$(cat /run/secrets/GIT_PAT) && \ git config --global url."https://feddybear:${HF_PAT}@huggingface.co/spaces/".insteadOf "git://huggingface.co/spaces/" && \ git config --global credential.helper 'store --file ~/.git-credentials' && \ echo "https://feddybear:${HF_PAT}@huggingface.co/spaces/" > ~/.git-credentials COPY . . RUN chmod +x sconfig.sh && ./sconfig.sh && tar -zxf sconfig.tgz && rm -f sconfig.tgz ~/.git-credentials RUN pip install -U pip && \ pip install --no-cache-dir --upgrade -r /code/requirements.txt CMD ["streamlit", "run", "flipgraph.py", "--server.address", "0.0.0.0", "--server.port", "7860"]