taiyo-demo / Dockerfile
yuki.tsutsumi
[update]app配下のフォルダの所有者をuserに変更。
4003174
raw
history blame contribute delete
562 Bytes
FROM python:3.11.9-slim
# cf: https://huggingface.co/docs/hub/en/spaces-sdks-docker#permissions
RUN useradd -m -u 1000 user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
RUN mkdir -p $HOME/app/logs && \
chown -R user:user $HOME/app && \
chmod -R 774 $HOME/app
COPY requirements.txt .
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y ffmpeg && \
pip install -r requirements.txt
USER user
EXPOSE 8501
COPY --chown=user:user . $HOME/app
ENTRYPOINT ["streamlit", "run"]
CMD ["main.py"]