-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
56 lines (45 loc) · 1.73 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04
# create a non-root user named "docker"
# we will use this when the user is logged in
RUN useradd -ms /bin/bash docker
USER root
ENV DOCKER_HOME /home/docker
# install apt dependencies and clone the repo
RUN apt-get update
RUN apt-get install -y git python python-pip
WORKDIR $DOCKER_HOME
RUN git clone https://github.com/brannondorsey/ml4music-workshop.git
WORKDIR $DOCKER_HOME/ml4music-workshop
RUN git submodule init
RUN git submodule update
# remove unnecessary files
RUN rm setup_wavenet_venv.sh
RUN rm start.sh
RUN rm Dockerfile
RUN rm -rf notebooks
# instal pip and pip dependencies
RUN pip install --upgrade pip
RUN pip install virtualenv
RUN pip install tensorflow==1.0.1
WORKDIR $DOCKER_HOME/ml4music-workshop/midi-rnn
RUN pip install -r requirements.txt
# install and setup a virtual env for tensorflow-wavenet
# as it requires a conflicting version of tensorflow from char-rnn-tensorflow
WORKDIR $DOCKER_HOME/ml4music-workshop/tensorflow-wavenet
RUN virtualenv venv
COPY setup_wavenet_venv.sh $DOCKER_HOME/ml4music-workshop/tensorflow-wavenet/setup_wavenet_venv.sh
RUN $DOCKER_HOME/ml4music-workshop/tensorflow-wavenet/setup_wavenet_venv.sh
RUN rm setup_wavenet_venv.sh
WORKDIR $DOCKER_HOME/ml4music-workshop
RUN chown -R docker:docker ./
USER docker
# expose tensorboard ports
# 7006 - char-rnn
# 7007 - midi-rnn
# 7008 - wavene7
EXPOSE 7006
EXPOSE 7007
EXPOSE 7008
CMD tensorboard --port 7006 --logdir $DOCKER_HOME/ml4music-workshop/char-rnn-tensorflow/logs &> /dev/null && \
tensorboard --port 7007 --logdir $DOCKER_HOME/ml4music-workshop/midi-rnn/experiments &> /dev/null && \
tensorboard --port 7008 --logdir $DOCKER_HOME/ml4music-workshop/tensorflow-wavenet/logdir &> /dev/null && bash