From 01624623bf33b47a4414890329fda75098549cff Mon Sep 17 00:00:00 2001 From: John W Date: Wed, 1 Apr 2020 15:28:15 -0400 Subject: [PATCH 1/5] adding Docker file and run script --- Dockerfile | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ run_mellotron.sh | 15 ++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 Dockerfile create mode 100755 run_mellotron.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..a0cf5f572 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,61 @@ +FROM nvcr.io/nvidia/pytorch:19.12-py3 + +WORKDIR "/workspace" + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -y +RUN apt-get install -y vim git ffmpeg libportaudio2 cmake python3.6-dev python3.7 python3.7-dev \ + ffmpeg libsndfile1 lame cmake openssh-server python3-pyqt5 xauth python3-pip \ + pulseaudio osspd-pulseaudio pulseaudio-module-jack gstreamer1.0-pulseaudio \ + pulseaudio-dlna pulseaudio-esound-compat libgstreamer-plugins-base1.0-0 \ + libgstreamer-plugins-good1.0-0 libgstreamer-plugins-bad1.0-0 liballegro-acodec5.2 libavcodec57 \ + python-translitcodec xmms2-plugin-avcodec xubuntu-restricted-extras python-soundfile \ + libsndifsdl2-dev python3-soundfile python-soundfile-doc \ + && apt-get -y autoremove + + +RUN python -m pip install matplotlib # ==2.1.0 +RUN python -m pip install inflect # ==0.2.5 +RUN python -m pip install librosa # ==0.6.0 +RUN python -m pip install scipy # ==1.0.0 +RUN python -m pip install tensorboardX # ==1.1 +RUN python -m pip install Unidecode # ==1.0.22 +RUN python -m pip install pillow +RUN python -m pip install nltk # ==3.4.5 +RUN python -m pip install jamo # ==0.4.1 +RUN python -m pip install music21 + +RUN conda install tensorflow\<2.0.0 + +RUN apt-get install -y musescore + +RUN rm -Rf /root/.cache/* + +RUN apt-get clean + +RUN systemd-tmpfiles --create + +RUN mkdir /run/sshd + +RUN mkdir ./logs +RUN chmod 777 ./logs + +RUN touch ./add_user.sh +RUN echo 'nohup tensorboard --logdir /workspace/logs --host 0.0.0.0 &' >> add_user.sh +RUN echo 'adduser --quiet --disabled-password --gecos "$1,,," --uid $2 $1' >> add_user.sh +RUN echo 'echo "export PATH=/usr/local/nvm/versions/node/v13.3.0/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo "export PATH=/opt/conda/bin:/opt/cmake-3.14.6-Linux-x86_64/bin/:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo "export PATH=/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo Added user ${1} ${2}' >> add_user.sh +RUN echo 'login -f $1' >> add_user.sh +RUN chmod +x add_user.sh +RUN sed -i 's/"\$\@"/\$\@/' /usr/local/bin/nvidia_entrypoint.sh + +EXPOSE 8888/tcp +EXPOSE 6006/tcp + +CMD ["bash -c"] + + + diff --git a/run_mellotron.sh b/run_mellotron.sh new file mode 100755 index 000000000..300aa280e --- /dev/null +++ b/run_mellotron.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ 1 -eq $# ] +then + imageid=$1 + export GID=$(id -g) + sudo docker container run --rm -it --gpus all \ + -v ${HOME}/projects/mellotron:/workspace/mellotron \ + -v ${HOME}/projects/LibriTTS/train-clean-100:/path_to_libritts \ + -v ${HOME}/projects/LJSpeech-1.1/wavs:/path_to_ljs \ + -p 9876:8888 -p 9875:6006 \ + ${imageid} /workspace/add_user.sh ${USER} ${UID} +else + echo "usage: ${0} " +fi From 17de1304630d29638c19a2104905c48e27004a01 Mon Sep 17 00:00:00 2001 From: John W Date: Wed, 1 Apr 2020 19:59:32 +0000 Subject: [PATCH 2/5] moved docker info to subdirectory --- docker/Dockerfile | 61 +++++++++++++++++++++++++++++++++++++++++ docker/run_mellotron.sh | 15 ++++++++++ 2 files changed, 76 insertions(+) create mode 100644 docker/Dockerfile create mode 100755 docker/run_mellotron.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..a0cf5f572 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,61 @@ +FROM nvcr.io/nvidia/pytorch:19.12-py3 + +WORKDIR "/workspace" + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -y +RUN apt-get install -y vim git ffmpeg libportaudio2 cmake python3.6-dev python3.7 python3.7-dev \ + ffmpeg libsndfile1 lame cmake openssh-server python3-pyqt5 xauth python3-pip \ + pulseaudio osspd-pulseaudio pulseaudio-module-jack gstreamer1.0-pulseaudio \ + pulseaudio-dlna pulseaudio-esound-compat libgstreamer-plugins-base1.0-0 \ + libgstreamer-plugins-good1.0-0 libgstreamer-plugins-bad1.0-0 liballegro-acodec5.2 libavcodec57 \ + python-translitcodec xmms2-plugin-avcodec xubuntu-restricted-extras python-soundfile \ + libsndifsdl2-dev python3-soundfile python-soundfile-doc \ + && apt-get -y autoremove + + +RUN python -m pip install matplotlib # ==2.1.0 +RUN python -m pip install inflect # ==0.2.5 +RUN python -m pip install librosa # ==0.6.0 +RUN python -m pip install scipy # ==1.0.0 +RUN python -m pip install tensorboardX # ==1.1 +RUN python -m pip install Unidecode # ==1.0.22 +RUN python -m pip install pillow +RUN python -m pip install nltk # ==3.4.5 +RUN python -m pip install jamo # ==0.4.1 +RUN python -m pip install music21 + +RUN conda install tensorflow\<2.0.0 + +RUN apt-get install -y musescore + +RUN rm -Rf /root/.cache/* + +RUN apt-get clean + +RUN systemd-tmpfiles --create + +RUN mkdir /run/sshd + +RUN mkdir ./logs +RUN chmod 777 ./logs + +RUN touch ./add_user.sh +RUN echo 'nohup tensorboard --logdir /workspace/logs --host 0.0.0.0 &' >> add_user.sh +RUN echo 'adduser --quiet --disabled-password --gecos "$1,,," --uid $2 $1' >> add_user.sh +RUN echo 'echo "export PATH=/usr/local/nvm/versions/node/v13.3.0/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo "export PATH=/opt/conda/bin:/opt/cmake-3.14.6-Linux-x86_64/bin/:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo "export PATH=/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo Added user ${1} ${2}' >> add_user.sh +RUN echo 'login -f $1' >> add_user.sh +RUN chmod +x add_user.sh +RUN sed -i 's/"\$\@"/\$\@/' /usr/local/bin/nvidia_entrypoint.sh + +EXPOSE 8888/tcp +EXPOSE 6006/tcp + +CMD ["bash -c"] + + + diff --git a/docker/run_mellotron.sh b/docker/run_mellotron.sh new file mode 100755 index 000000000..300aa280e --- /dev/null +++ b/docker/run_mellotron.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ 1 -eq $# ] +then + imageid=$1 + export GID=$(id -g) + sudo docker container run --rm -it --gpus all \ + -v ${HOME}/projects/mellotron:/workspace/mellotron \ + -v ${HOME}/projects/LibriTTS/train-clean-100:/path_to_libritts \ + -v ${HOME}/projects/LJSpeech-1.1/wavs:/path_to_ljs \ + -p 9876:8888 -p 9875:6006 \ + ${imageid} /workspace/add_user.sh ${USER} ${UID} +else + echo "usage: ${0} " +fi From 3d541e2a803915a5deee27359050b30a9f711ea3 Mon Sep 17 00:00:00 2001 From: John W Date: Wed, 1 Apr 2020 16:02:41 -0400 Subject: [PATCH 3/5] remove original locations --- Dockerfile | 61 ------------------------------------------------ run_mellotron.sh | 15 ------------ 2 files changed, 76 deletions(-) delete mode 100644 Dockerfile delete mode 100755 run_mellotron.sh diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a0cf5f572..000000000 --- a/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -FROM nvcr.io/nvidia/pytorch:19.12-py3 - -WORKDIR "/workspace" - -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update -y -RUN apt-get install -y vim git ffmpeg libportaudio2 cmake python3.6-dev python3.7 python3.7-dev \ - ffmpeg libsndfile1 lame cmake openssh-server python3-pyqt5 xauth python3-pip \ - pulseaudio osspd-pulseaudio pulseaudio-module-jack gstreamer1.0-pulseaudio \ - pulseaudio-dlna pulseaudio-esound-compat libgstreamer-plugins-base1.0-0 \ - libgstreamer-plugins-good1.0-0 libgstreamer-plugins-bad1.0-0 liballegro-acodec5.2 libavcodec57 \ - python-translitcodec xmms2-plugin-avcodec xubuntu-restricted-extras python-soundfile \ - libsndifsdl2-dev python3-soundfile python-soundfile-doc \ - && apt-get -y autoremove - - -RUN python -m pip install matplotlib # ==2.1.0 -RUN python -m pip install inflect # ==0.2.5 -RUN python -m pip install librosa # ==0.6.0 -RUN python -m pip install scipy # ==1.0.0 -RUN python -m pip install tensorboardX # ==1.1 -RUN python -m pip install Unidecode # ==1.0.22 -RUN python -m pip install pillow -RUN python -m pip install nltk # ==3.4.5 -RUN python -m pip install jamo # ==0.4.1 -RUN python -m pip install music21 - -RUN conda install tensorflow\<2.0.0 - -RUN apt-get install -y musescore - -RUN rm -Rf /root/.cache/* - -RUN apt-get clean - -RUN systemd-tmpfiles --create - -RUN mkdir /run/sshd - -RUN mkdir ./logs -RUN chmod 777 ./logs - -RUN touch ./add_user.sh -RUN echo 'nohup tensorboard --logdir /workspace/logs --host 0.0.0.0 &' >> add_user.sh -RUN echo 'adduser --quiet --disabled-password --gecos "$1,,," --uid $2 $1' >> add_user.sh -RUN echo 'echo "export PATH=/usr/local/nvm/versions/node/v13.3.0/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh -RUN echo 'echo "export PATH=/opt/conda/bin:/opt/cmake-3.14.6-Linux-x86_64/bin/:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh -RUN echo 'echo "export PATH=/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh -RUN echo 'echo Added user ${1} ${2}' >> add_user.sh -RUN echo 'login -f $1' >> add_user.sh -RUN chmod +x add_user.sh -RUN sed -i 's/"\$\@"/\$\@/' /usr/local/bin/nvidia_entrypoint.sh - -EXPOSE 8888/tcp -EXPOSE 6006/tcp - -CMD ["bash -c"] - - - diff --git a/run_mellotron.sh b/run_mellotron.sh deleted file mode 100755 index 300aa280e..000000000 --- a/run_mellotron.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ 1 -eq $# ] -then - imageid=$1 - export GID=$(id -g) - sudo docker container run --rm -it --gpus all \ - -v ${HOME}/projects/mellotron:/workspace/mellotron \ - -v ${HOME}/projects/LibriTTS/train-clean-100:/path_to_libritts \ - -v ${HOME}/projects/LJSpeech-1.1/wavs:/path_to_ljs \ - -p 9876:8888 -p 9875:6006 \ - ${imageid} /workspace/add_user.sh ${USER} ${UID} -else - echo "usage: ${0} " -fi From e1276cbac43adeaf5de3ec3784a1abf1098581bd Mon Sep 17 00:00:00 2001 From: pneumoman Date: Wed, 1 Apr 2020 16:21:21 -0400 Subject: [PATCH 4/5] add readme --- docker/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docker/README.md diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..a8cd511e4 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,18 @@ +# This is a Dockerfile and runscript to help you get going quickly +- It makes container run as you instad of root +- Automatically starts Tensorboard +## It makes the following assumptions: +* You are running Ubuntu +* You have a projects folder under your Home folder +* Under your projects folder you have cloned Mellotron +* Also under your projects folder you have un-tarred the LibriTTS and or LJSpeech +## Running the script: +To run the container provide the tag you gave your image when you built it. +... +pneumoman@zombunnie:~/projects/mellotron$ ./run_mellotron.sh mellotronix +... +## Running Training +Use full paths! I.E. +... +pneumoman@2a57e3b56769:/workspace/mellotron$ python train.py --output_directory=/workspace/mellotron/models --log_directory=/workspace/logs +... From ce632536af640c4776038585b8838e54b7df2037 Mon Sep 17 00:00:00 2001 From: John W Date: Wed, 1 Apr 2020 15:28:15 -0400 Subject: [PATCH 5/5] adding Docker file and run script moved docker info to subdirectory remove original locations add readme --- docker/Dockerfile | 61 +++++++++++++++++++++++++++++++++++++++++ docker/README.md | 18 ++++++++++++ docker/run_mellotron.sh | 15 ++++++++++ 3 files changed, 94 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md create mode 100755 docker/run_mellotron.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..a0cf5f572 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,61 @@ +FROM nvcr.io/nvidia/pytorch:19.12-py3 + +WORKDIR "/workspace" + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -y +RUN apt-get install -y vim git ffmpeg libportaudio2 cmake python3.6-dev python3.7 python3.7-dev \ + ffmpeg libsndfile1 lame cmake openssh-server python3-pyqt5 xauth python3-pip \ + pulseaudio osspd-pulseaudio pulseaudio-module-jack gstreamer1.0-pulseaudio \ + pulseaudio-dlna pulseaudio-esound-compat libgstreamer-plugins-base1.0-0 \ + libgstreamer-plugins-good1.0-0 libgstreamer-plugins-bad1.0-0 liballegro-acodec5.2 libavcodec57 \ + python-translitcodec xmms2-plugin-avcodec xubuntu-restricted-extras python-soundfile \ + libsndifsdl2-dev python3-soundfile python-soundfile-doc \ + && apt-get -y autoremove + + +RUN python -m pip install matplotlib # ==2.1.0 +RUN python -m pip install inflect # ==0.2.5 +RUN python -m pip install librosa # ==0.6.0 +RUN python -m pip install scipy # ==1.0.0 +RUN python -m pip install tensorboardX # ==1.1 +RUN python -m pip install Unidecode # ==1.0.22 +RUN python -m pip install pillow +RUN python -m pip install nltk # ==3.4.5 +RUN python -m pip install jamo # ==0.4.1 +RUN python -m pip install music21 + +RUN conda install tensorflow\<2.0.0 + +RUN apt-get install -y musescore + +RUN rm -Rf /root/.cache/* + +RUN apt-get clean + +RUN systemd-tmpfiles --create + +RUN mkdir /run/sshd + +RUN mkdir ./logs +RUN chmod 777 ./logs + +RUN touch ./add_user.sh +RUN echo 'nohup tensorboard --logdir /workspace/logs --host 0.0.0.0 &' >> add_user.sh +RUN echo 'adduser --quiet --disabled-password --gecos "$1,,," --uid $2 $1' >> add_user.sh +RUN echo 'echo "export PATH=/usr/local/nvm/versions/node/v13.3.0/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo "export PATH=/opt/conda/bin:/opt/cmake-3.14.6-Linux-x86_64/bin/:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo "export PATH=/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:\$PATH" >> /home/${1}/.bashrc' >> add_user.sh +RUN echo 'echo Added user ${1} ${2}' >> add_user.sh +RUN echo 'login -f $1' >> add_user.sh +RUN chmod +x add_user.sh +RUN sed -i 's/"\$\@"/\$\@/' /usr/local/bin/nvidia_entrypoint.sh + +EXPOSE 8888/tcp +EXPOSE 6006/tcp + +CMD ["bash -c"] + + + diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..a8cd511e4 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,18 @@ +# This is a Dockerfile and runscript to help you get going quickly +- It makes container run as you instad of root +- Automatically starts Tensorboard +## It makes the following assumptions: +* You are running Ubuntu +* You have a projects folder under your Home folder +* Under your projects folder you have cloned Mellotron +* Also under your projects folder you have un-tarred the LibriTTS and or LJSpeech +## Running the script: +To run the container provide the tag you gave your image when you built it. +... +pneumoman@zombunnie:~/projects/mellotron$ ./run_mellotron.sh mellotronix +... +## Running Training +Use full paths! I.E. +... +pneumoman@2a57e3b56769:/workspace/mellotron$ python train.py --output_directory=/workspace/mellotron/models --log_directory=/workspace/logs +... diff --git a/docker/run_mellotron.sh b/docker/run_mellotron.sh new file mode 100755 index 000000000..300aa280e --- /dev/null +++ b/docker/run_mellotron.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ 1 -eq $# ] +then + imageid=$1 + export GID=$(id -g) + sudo docker container run --rm -it --gpus all \ + -v ${HOME}/projects/mellotron:/workspace/mellotron \ + -v ${HOME}/projects/LibriTTS/train-clean-100:/path_to_libritts \ + -v ${HOME}/projects/LJSpeech-1.1/wavs:/path_to_ljs \ + -p 9876:8888 -p 9875:6006 \ + ${imageid} /workspace/add_user.sh ${USER} ${UID} +else + echo "usage: ${0} " +fi