Spaces:
Sleeping
Sleeping
| FROM python:3.9 | |
| USER root | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| git-lfs \ | |
| ca-certificates \ | |
| --no-install-recommends && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| RUN git lfs install | |
| RUN --mount=type=secret,id=HF_UAT,mode=0444,required=true \ | |
| git clone https://ChenyuRabbitLove:$(cat /run/secrets/HF_UAT)@huggingface.co/spaces/JunyiAcademy/J_diagnosis_3.git | |
| RUN mv $HOME/app/J_diagnosis_3/* $HOME/app/ && rm -rf $HOME/app/J_diagnosis_3 | |
| RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt | |
| RUN --mount=type=secret,id=DEPLOY,mode=0444,required=true \ | |
| export DEPLOY=$(cat /run/secrets/DEPLOY) && \ | |
| echo "export local_config=${DEPLOY}" >> $HOME/.bashrc | |
| CMD ["python", "app.py"] |