Skip to content

Commit

Permalink
Docker support for CPU and CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Aug 14, 2023
1 parent fb9372c commit a83e408
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile.cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.10

ENV GRADIO_SERVER_NAME=0.0.0.0
WORKDIR /roop

RUN apt-get update
RUN apt-get install -y ffmpeg

RUN git clone https://github.com/s0md3v/roop.git .
RUN git checkout next
RUN pip install -r requirements-docker.cpu.txt
12 changes: 12 additions & 0 deletions Dockerfile.cuda
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
FROM python:3.10

ENV GRADIO_SERVER_NAME=0.0.0.0
WORKDIR /roop

RUN apt-get update
RUN apt-get install -y ffmpeg

RUN git clone https://github.com/s0md3v/roop.git .
RUN git checkout next
RUN pip install -r requirements-docker.cuda.txt
9 changes: 9 additions & 0 deletions docker-compose.cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
roop-cpu:
build:
dockerfile: Dockerfile.cpu
command: ['python', 'run.py']
volumes:
- ./models:/roop/models
ports:
- 8000:7860
16 changes: 16 additions & 0 deletions docker-compose.cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
roop-cuda:
build:
dockerfile: Dockerfile.cuda
command: ['python', 'run.py --execution-provider cuda']
volumes:
- ./models:/roop/models
expose:
- 8000:7860
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu, video]

0 comments on commit a83e408

Please sign in to comment.