Update Dockerfile

This commit is contained in:
litagin02
2024-02-23 19:57:23 +09:00
parent 049b0fc1d5
commit 039d23d560
4 changed files with 77 additions and 1 deletions

22
Dockerfile.deploy Normal file
View File

@@ -0,0 +1,22 @@
# Hugging face spaces (CPU) でエディタ (server_editor.py) のデプロイ用
# See https://huggingface.co/docs/hub/spaces-sdks-docker-first-demo
FROM python:3.10
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
RUN pip install --no-cache-dir --upgrade pip
COPY --chown=user . $HOME/app
RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
CMD ["python", "server_editor.py"]