diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..08f12f63 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-devel + +RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub && \ + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub + +RUN apt-get update && \ + apt-get install -y wget && \ + wget -qO - https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \ + apt-get update && \ + apt-get install -y git && \ + apt-get install ffmpeg libsm6 libxext6 -y && \ + apt install -y libprotobuf-dev protobuf-compiler && \ + apt-get clean + +RUN pip install --upgrade pip +RUN pip install --upgrade setuptools + + +WORKDIR /simpswap +COPY ./requirements.txt /simpswap/requirements.txt +RUN pip install -r /simpswap/requirements.txt + + +# Use external volume for data +ENV NVIDIA_VISIBLE_DEVICES 1 +CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--allow-root"] diff --git a/README.md b/README.md index 3b90adc3..c2456990 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,21 @@ For academic and non-commercial use only.The whole project is under the CC-BY-NC [![logo](./docs/img/vggface2_hq_compare.png)](https://github.com/NNNNAI/VGGFace2-HQ) +## Installation + +```bash +# Git clone +git clone +# Download weights +bash download_weights.sh +# Build Docker file +docker build -t simswap . +# Run docker file +docker run -it -v :/simpswap --gpus=all -p 8888:8888 simswap:latest +# Access jupyter notebook +http://localhost:8888/tree/simpswap +``` + Learn about our other projects [[VGGFace2-HQ]](https://github.com/NNNNAI/VGGFace2-HQ); diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..1d4be072 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +jupyter +autopep8 +sets +isort +Pillow +insightface==0.2.1 +onnxruntime +moviepy +imageio==2.4.1 +numpy==1.19.5 +lpips