Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9dceb94c7 | ||
|
|
50cb1f1940 | ||
|
|
b00d3e3588 | ||
|
|
f6460d8900 |
67
Dockerfile
Normal file
67
Dockerfile
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
ARG CUDA_VERSION=11.1
|
||||||
|
|
||||||
|
# onnxruntime-gpu requires cudnn
|
||||||
|
ARG CUDNN_VER=8
|
||||||
|
|
||||||
|
# See possible types: https://hub.docker.com/r/nvidia/cuda/tags?page=1&ordering=last_updated
|
||||||
|
ARG IMAGE_TYPE=runtime
|
||||||
|
|
||||||
|
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VER}-${IMAGE_TYPE}-ubuntu20.04 AS builder
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y software-properties-common && \
|
||||||
|
# the latest version of Git
|
||||||
|
add-apt-repository ppa:git-core/ppa && \
|
||||||
|
apt update && \
|
||||||
|
apt install -y --no-install-recommends \
|
||||||
|
git ca-certificates wget unzip libgl1-mesa-glx \
|
||||||
|
&& \
|
||||||
|
apt autoremove -y && \
|
||||||
|
apt clean -y
|
||||||
|
|
||||||
|
# Install Miniconda See possible versions: https://repo.anaconda.com/miniconda/
|
||||||
|
ARG CONDA_VERSION=3-py38_4.9.2
|
||||||
|
|
||||||
|
ARG CONDA_DIR=/opt/conda
|
||||||
|
|
||||||
|
ENV PATH=$CONDA_DIR/bin:$PATH
|
||||||
|
|
||||||
|
RUN wget -q -O ./miniconda.sh http://repo.continuum.io/miniconda/Miniconda${CONDA_VERSION}-Linux-x86_64.sh \
|
||||||
|
&& sh ./miniconda.sh -bfp $CONDA_DIR \
|
||||||
|
&& rm ./miniconda.sh
|
||||||
|
|
||||||
|
WORKDIR /home
|
||||||
|
|
||||||
|
COPY ./environment.yml ./environment.yml
|
||||||
|
|
||||||
|
RUN conda env update -n base --prune --file ./environment.yml && \
|
||||||
|
conda clean -ayf && rm ./environment.yml
|
||||||
|
|
||||||
|
RUN git clone --single-branch https://github.com/neuralchen/SimSwap.git && \
|
||||||
|
cd ./SimSwap && \
|
||||||
|
rm -rf .git && \
|
||||||
|
./download-weights.sh && \
|
||||||
|
wget -P ./parsing_model/checkpoint https://github.com/neuralchen/SimSwap/releases/download/1.0/79999_iter.pth
|
||||||
|
|
||||||
|
|
||||||
|
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VER}-${IMAGE_TYPE}-ubuntu20.04
|
||||||
|
|
||||||
|
ARG CONDA_DIR=/opt/conda
|
||||||
|
|
||||||
|
# Copy conda installation
|
||||||
|
COPY --from=builder /opt/conda $CONDA_DIR
|
||||||
|
|
||||||
|
ENV PATH=$CONDA_DIR/bin:$PATH
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y --no-install-recommends libgl1-mesa-glx && \
|
||||||
|
apt autoremove -y && \
|
||||||
|
apt clean -y
|
||||||
|
|
||||||
|
COPY --from=builder /home/SimSwap /home/SimSwap
|
||||||
|
|
||||||
|
WORKDIR /home/SimSwap
|
||||||
@@ -7,3 +7,5 @@ wget --no-check-certificate "https://sh23tw.dm.files.1drv.com/y4mmGiIkNVigkSwOKD
|
|||||||
mkdir -p insightface_func/models
|
mkdir -p insightface_func/models
|
||||||
unzip ./antelope.zip -d ./insightface_func/models/
|
unzip ./antelope.zip -d ./insightface_func/models/
|
||||||
rm antelope.zip
|
rm antelope.zip
|
||||||
|
wget -P ./parsing_model/checkpoint https://github.com/neuralchen/SimSwap/releases/download/1.0/79999_iter.pth
|
||||||
|
|
||||||
|
|||||||
16
environment.yml
Normal file
16
environment.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
channels:
|
||||||
|
- defaults
|
||||||
|
- conda-forge
|
||||||
|
- pytorch
|
||||||
|
dependencies:
|
||||||
|
- numpy=1.20.2
|
||||||
|
- opencv=4.5.0
|
||||||
|
- pillow=8.2.0
|
||||||
|
- moviepy
|
||||||
|
- pip=21.2.2
|
||||||
|
- pip:
|
||||||
|
- insightface==0.2.1
|
||||||
|
- onnxruntime-gpu==1.8.1
|
||||||
|
- -f https://download.pytorch.org/whl/torch_stable.html
|
||||||
|
- torch==1.9.0+cu111
|
||||||
|
- torchvision==0.10.0+cu111
|
||||||
Reference in New Issue
Block a user