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

42
.dockerignore Normal file
View File

@@ -0,0 +1,42 @@
# Dockerfile.deploy用
*.pyc
*.pyo
*.pyd
__pycache__
*.pyc
venv/
.vscode/
.ipynb_checkpoints/
*.ipynb
.git/
.gitignore
Dockerfile*
.dockerignore
*.md
*.bat
LICENSE
*.wav
*.zip
*.csv
# 中国語と英語が必要な場合はコメントアウト
/bert/chinese-roberta-wwm-ext-large/
/bert/deberta-v3-large/
Data/
dict/
docs/
inputs/
mos_results/
pretrained/
pretrained_jp_extra/
scripts/
slm/
static/
tools/

2
.gitignore vendored
View File

@@ -28,7 +28,7 @@ venv/
safetensors.ipynb safetensors.ipynb
*.wav *.wav
/Web/ /static/
# pyopenjtalk's dictionary # pyopenjtalk's dictionary
*.dic *.dic

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"]

View File

@@ -1,3 +1,15 @@
# PaperspaceのGradient環境での学習環境構築用Dockerfileです。
# 環境のみ構築するため、イメージには学習用のコードは含まれていません。
# 以下を参照しました。
# https://github.com/gradient-ai/base-container/tree/main/pt211-tf215-cudatk120-py311
# 主なバージョン等
# Ubuntu 22.04
# Python 3.10
# PyTorch 2.1.2 (CUDA 11.8)
# CUDA Toolkit 12.0, CUDNN 8.9.7
# ================================================================== # ==================================================================
# Initial setup # Initial setup
# ------------------------------------------------------------------ # ------------------------------------------------------------------