Optimizing the Docker deployment process (#456)

This commit is contained in:
NijiNeko 2024-06-19 18:01:20 +08:00 committed by GitHub
parent 75ba7f5cef
commit 73eda722f8
3 changed files with 10 additions and 7 deletions

View file

@ -5,6 +5,11 @@ LABEL org.opencontainers.image.source = "https://github.com/hpcaitech/Open-Sora"
LABEL org.opencontainers.image.licenses = "Apache License 2.0"
LABEL org.opencontainers.image.base.name = "docker.io/library/hpcaitech/pytorch-cuda:2.1.0-12.1.0"
# Set the working directory
WORKDIR /workspace/Open-Sora
# Copy the current directory contents into the container at /workspace/Open-Sora
COPY . .
# inatall library dependencies
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
@ -18,6 +23,4 @@ RUN pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolati
RUN pip install xformers --index-url https://download.pytorch.org/whl/cu121
# install this project
RUN git clone https://github.com/hpcaitech/Open-Sora && \
cd Open-Sora && \
pip install -v .
RUN pip install -v .

View file

@ -203,13 +203,13 @@ pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation -
Run the following command to build a docker image from Dockerfile provided.
```bash
docker build -t opensora ./docker
docker build -t opensora .
```
Run the following command to start the docker container in interactive mode.
```bash
docker run -ti --gpus all -v {MOUNT_DIR}:/data opensora
docker run -ti --gpus all -v .:/workspace/Open-Sora opensora
```
## Model Weights

View file

@ -175,13 +175,13 @@ pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation -
运行以下命令从提供的Dockerfile 构建docker 镜像。
```bash
docker build -t opensora ./docker
docker build -t opensora .
```
运行以下命令以交互模式启动docker容器。
```bash
docker run -ti --gpus all -v {MOUNT_DIR}:/data opensora
docker run -ti --gpus all -v .:/workspace/Open-Sora opensora
```
## 模型权重