Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM nvidia/cuda:12.6.2-cudnn-runtime-ubuntu24.04

RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get install -y git curl pip \
&& git clone https://github.com/VectorSpaceLab/OmniGen.git \
&& cd OmniGen \
&& pip install --break-system-packages -e . \
&& pip install --break-system-packages gradio spaces \
&& pip cache purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i 's/demo\.launch(.*)/demo.launch(server_name="0.0.0.0")/' app.py

WORKDIR /OmniGen/
ENTRYPOINT ["python3", "app.py"]
25 changes: 25 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Build the Docker Image
Run the following commands to build the image:

```bash
cd docker/
sudo docker build -t omni1 .
```

**Build Notes**:
- On a machine with a Xeon Silver CPU and an SSD, the build process takes approximately 10 minutes.
- The resulting Docker image is approximately 11GB in size.

# Run the Docker Container
Use this command to run the container:

```bash
mkdir -p ~/Omni/.cache
sudo docker run -p 7860:7860 --name omni --rm --gpus all -it -v ~/Omni/.cache:/root/.cache omni1
```

**Model Storage**: The directory `/root/.cache` inside the container is used to store the model. Make sure your system has at least 18GB of free space in the `~/Omni/.cache` directory.

**First Run**: The first time you run the container, it may take several minutes to download the model.

**Subsequent Runs**: Starting the container will take about 15–40 seconds.