Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerize the "Remote GPU" service (#224)
* Dockerfile * add docker support in run.sh and readme * Update README * Update TOC * Update TOC * Fix headless error * use GPU as default * Update README.md * Create install_docker.sh * update install for v4l2loopback Co-authored-by: monsteruser <mintmaker@user.noreply.github.com> Co-authored-by: mintmaker <54767039+mintmaker@users.noreply.github.com>
- Loading branch information
1 parent
56e8f6d
commit 5638984
Showing
4 changed files
with
162 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM nvcr.io/nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04 | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get -qqy install curl python3-pip python3-tk ffmpeg git less nano libsm6 libxext6 libxrender-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ARG PYTORCH_WHEEL="https://download.pytorch.org/whl/cu100/torch-1.0.0-cp36-cp36m-linux_x86_64.whl" | ||
ARG FACE_ALIGNMENT_GIT="git+https://github.com/1adrianb/face-alignment" | ||
ARG AVATARIFY_COMMIT="01db88c8580b982278ae944b89b3bfab5d98c1dd" | ||
ARG FOMM_COMMIT="efbe0a6f17b38360ff9a446fddfbb3ce5493534c" | ||
|
||
RUN git clone https://github.com/alievk/avatarify.git /app/avatarify && cd /app/avatarify && git checkout ${AVATARIFY_COMMIT} \ | ||
&& git clone https://github.com/alievk/first-order-model.git /app/avatarify/fomm && cd /app/avatarify/fomm && git checkout ${FOMM_COMMIT} | ||
|
||
WORKDIR /app/avatarify | ||
|
||
RUN bash scripts/download_data.sh | ||
|
||
RUN pip3 install ${PYTORCH_WHEEL} ${FACE_ALIGNMENT_GIT} -r requirements.txt \ | ||
&& pip3 install ${PYTORCH_WHEEL} ${FACE_ALIGNMENT_GIT} -r fomm/requirements.txt \ | ||
&& rm -rf /root/.cache/pip | ||
|
||
ENV PYTHONPATH="/app/avatarify:/app/avatarify/fomm" | ||
|
||
EXPOSE 5557 | ||
EXPOSE 5558 | ||
|
||
CMD ["python3", "afy/cam_fomm.py", "--config", "fomm/config/vox-adv-256.yaml", "--checkpoint", "vox-adv-cpk.pth.tar", "--virt-cam", "9", "--relative", "--adapt_scale", "--is-worker"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
if [[ ! $@ =~ "no-vcam" ]]; then | ||
rm -rf v4l2loopback 2> /dev/null | ||
git clone https://github.com/umlaeute/v4l2loopback | ||
echo "--- Installing v4l2loopback (sudo privelege required)" | ||
cd v4l2loopback | ||
make && sudo make install | ||
sudo depmod -a | ||
cd .. | ||
fi |