Spaces:
Running
Running
File size: 595 Bytes
77f3eaf 748e8a4 974ec25 2f7a0cd 5ef899c 3bb45db 5ef899c 3bb45db 5ef899c 49184e1 3bb45db 2f7a0cd 89d4f0b 49184e1 f51ea2c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM python:3.12
RUN useradd -m -u 1000 user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
COPY . $HOME/app
ENV HF_TOKEN=${HF_TOKEN}
RUN echo "The token is: ${HF_TOKEN}"
RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt && \
huggingface-cli login --token $HF_TOKEN --add-to-git-credential
# Opt to user instead of root
USER user
RUN chown -R user:user $HOME
WORKDIR $HOME/app
EXPOSE 7860
CMD streamlit run app.py \
--server.headless true \
--server.enableCORS false \
--server.enableXsrfProtection false \
--server.fileWatcherType none \ |