├── imagefiles-sudo └── x2go ├── Makefile ├── minimal-ML ├── build_dockerfile ├── .vimrc └── Dockerfile ├── full-GPU ├── build_dockerfile ├── .vimrc └── Dockerfile ├── minimal-SDR ├── build_dockerfile ├── .vimrc └── Dockerfile ├── imagefiles-supervisord ├── supervisord.conf ├── sshd.conf └── jupyter.conf ├── minimal-ML-GPU ├── build_dockerfile ├── .vimrc └── Dockerfile ├── .vimrc ├── imagefiles-jupyter └── jupyter_notebook_config.py ├── README.md └── Dockerfile /imagefiles-sudo/x2go: -------------------------------------------------------------------------------- 1 | x2go ALL=(ALL) NOPASSWD:ALL 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | build-radioml: 2 | docker build --rm -t radioml . 3 | -------------------------------------------------------------------------------- /minimal-ML/build_dockerfile: -------------------------------------------------------------------------------- 1 | sudo docker build -t radioml/minml . 2 | -------------------------------------------------------------------------------- /full-GPU/build_dockerfile: -------------------------------------------------------------------------------- 1 | sudo nvidia-docker build -t radioml/gpu . 2 | -------------------------------------------------------------------------------- /minimal-SDR/build_dockerfile: -------------------------------------------------------------------------------- 1 | sudo docker build -t radioml/minsdr . 2 | -------------------------------------------------------------------------------- /imagefiles-supervisord/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | -------------------------------------------------------------------------------- /imagefiles-supervisord/sshd.conf: -------------------------------------------------------------------------------- 1 | [program:sshd] 2 | command=/usr/sbin/sshd -D 3 | -------------------------------------------------------------------------------- /minimal-ML-GPU/build_dockerfile: -------------------------------------------------------------------------------- 1 | sudo nvidia-docker build -t radioml/minml . 2 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | set expandtab 2 | set tabstop=4 3 | autocmd FileType make setlocal noexpandtab 4 | syntax enable 5 | 6 | -------------------------------------------------------------------------------- /full-GPU/.vimrc: -------------------------------------------------------------------------------- 1 | set expandtab 2 | set tabstop=4 3 | autocmd FileType make setlocal noexpandtab 4 | syntax enable 5 | 6 | -------------------------------------------------------------------------------- /minimal-ML/.vimrc: -------------------------------------------------------------------------------- 1 | set expandtab 2 | set tabstop=4 3 | autocmd FileType make setlocal noexpandtab 4 | syntax enable 5 | 6 | -------------------------------------------------------------------------------- /minimal-ML-GPU/.vimrc: -------------------------------------------------------------------------------- 1 | set expandtab 2 | set tabstop=4 3 | autocmd FileType make setlocal noexpandtab 4 | syntax enable 5 | 6 | -------------------------------------------------------------------------------- /minimal-SDR/.vimrc: -------------------------------------------------------------------------------- 1 | set expandtab 2 | set tabstop=4 3 | autocmd FileType make setlocal noexpandtab 4 | syntax enable 5 | 6 | -------------------------------------------------------------------------------- /imagefiles-jupyter/jupyter_notebook_config.py: -------------------------------------------------------------------------------- 1 | ## The port the notebook server will listen on. 2 | c.NotebookApp.ip = "*" 3 | c.NotebookApp.port = 8888 4 | -------------------------------------------------------------------------------- /imagefiles-supervisord/jupyter.conf: -------------------------------------------------------------------------------- 1 | [program:jupyter] 2 | user=x2go 3 | directory=/home/x2go 4 | environment=HOME="/home/x2go",USER="x2go",jupyter_config="/home/x2go/.jupyter" 5 | command=jupyter notebook 6 | -------------------------------------------------------------------------------- /minimal-SDR/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Tim O'Shea 3 | 4 | # set up environment 5 | ENV DEBIAN_FRONTEND noninteractive 6 | 7 | # update repos/ppas... 8 | RUN apt-get update 9 | RUN apt-get install -y python-software-properties software-properties-common 10 | RUN apt-add-repository -y ppa:x2go/stable 11 | RUN apt-get update 12 | 13 | # install core packages 14 | RUN apt-get install -y python-pip git openssh-server vim emacs screen tmux locate 15 | RUN apt-get install -y python-matplotlib python-scipy python-numpy 16 | RUN apt-get install -y python-numpy python-dev 17 | 18 | # Set up remove login info 19 | RUN mkdir /var/run/sshd 20 | RUN echo 'root:radioml' | chpasswd 21 | RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config 22 | 23 | # somewhat more graphical packages.. 24 | RUN apt-get install -y firefox evince audacity meld 25 | 26 | # set up remove visual login packages ... 27 | RUN apt-get install -y xfwm4 xfce4 x2goserver x2goserver-xsession 28 | 29 | # install python packages 30 | RUN pip install --upgrade pip 31 | 32 | # set up gnuradio and related tools 33 | RUN apt-get install -y autotools-dev autoconf sudo wireshark gdb 34 | RUN pip install --upgrade git+https://github.com/gnuradio/pybombs.git 35 | RUN mkdir /gr/ 36 | RUN cd /gr/ && pybombs prefix init . 37 | RUN cd /gr/ && pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git 38 | RUN cd /gr/ && pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git 39 | RUN cd /gr/ && pybombs install gnuradio gr-burst gr-pyqt gr-pcap gr-mapper gr-analysis gr-mediatools 40 | 41 | # check out sources for reference 42 | RUN /bin/ln -s /gr/src/ /root/src 43 | 44 | # copy in some helpful files / set up env on login 45 | COPY .vimrc /root/ 46 | RUN echo "source /gr/setup_env.sh" >> /root/.bashrc 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /minimal-ML-GPU/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:7.5-cudnn4-devel 2 | MAINTAINER Tim O'Shea 3 | 4 | # set up environment 5 | ENV DEBIAN_FRONTEND noninteractive 6 | 7 | # update repos/ppas... 8 | RUN apt-get update 9 | RUN apt-get install -y python-software-properties software-properties-common 10 | RUN apt-add-repository -y ppa:x2go/stable 11 | RUN apt-get update 12 | 13 | # install core packages 14 | RUN apt-get install -y python-pip git openssh-server vim emacs screen tmux locate 15 | RUN apt-get install -y python-matplotlib python-scipy python-numpy 16 | RUN apt-get install -y python-sklearn python-sklearn-doc python-skimage python-skimage-doc python-scikits-learn python-scikits.statsmodels 17 | 18 | # Set up remove login info 19 | RUN mkdir /var/run/sshd 20 | RUN echo 'root:radioml' | chpasswd 21 | RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config 22 | 23 | # somewhat more graphical packages.. 24 | RUN apt-get install -y python-opencv gimp 25 | RUN apt-get install -y firefox evince audacity meld 26 | 27 | # set up remove visual login packages ... 28 | RUN apt-get install -y xfwm4 xfce4 x2goserver x2goserver-xsession 29 | 30 | # install python packages 31 | RUN pip install --upgrade pip 32 | RUN pip install --upgrade ipython[all] 33 | RUN pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git 34 | RUN pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl 35 | RUN pip install --upgrade git+https://github.com/fchollet/keras.git 36 | RUN pip install --upgrade seaborn tqdm 37 | RUN pip install --upgrade pandas 38 | 39 | # set up gnuradio and related tools 40 | RUN apt-get install -y sudo 41 | 42 | # check out sources for reference 43 | RUN mkdir /root/src/ 44 | RUN cd /root/src/ && git clone https://github.com/Theano/Theano.git 45 | RUN cd /root/src/ && git clone https://github.com/tensorflow/tensorflow.git 46 | RUN cd /root/src/ && git clone https://github.com/fchollet/keras.git 47 | 48 | # Build PyOpenPNL and Gym deps 49 | RUN pip install networkx 50 | RUN apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig pypy-dev automake autoconf libtool 51 | RUN cd /root/src/ && git clone https://github.com/PyOpenPNL/OpenPNL.git && cd OpenPNL && ./autogen.sh && ./configure CFLAGS='-g -O2 -fpermissive -w' CXXFLAGS='-g -O2 -fpermissive -w' && make -j4 && make install 52 | RUN cd /root/src/ && git clone https://github.com/PyOpenPNL/PyOpenPNL.git && cd PyOpenPNL && python setup.py build && python setup.py install 53 | RUN cd /root/src/ && git clone https://github.com/osh/kerlym.git && cd kerlym && python setup.py build && python setup.py install 54 | 55 | # set up OpenAI Gym 56 | RUN cd /root/src/ && git clone https://github.com/openai/gym.git && cd gym && pip install -e . 57 | RUN pip install gym[atari] pachi_py 58 | RUN mkdir /root/src/notebooks/ 59 | 60 | # copy in some helpful files / set up env on login 61 | COPY .vimrc /root/ 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /minimal-ML/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Tim O'Shea 3 | 4 | # set up environment 5 | ENV DEBIAN_FRONTEND noninteractive 6 | 7 | # update repos/ppas... 8 | RUN apt-get update 9 | RUN apt-get install -y python-software-properties software-properties-common 10 | RUN apt-add-repository -y ppa:x2go/stable 11 | RUN apt-get update 12 | 13 | # install core packages 14 | RUN apt-get install -y python-pip git openssh-server vim emacs screen tmux locate 15 | RUN apt-get install -y python-matplotlib python-scipy python-numpy 16 | RUN apt-get install -y python-sklearn python-sklearn-doc python-skimage python-skimage-doc python-scikits-learn python-scikits.statsmodels 17 | 18 | # Set up remove login info 19 | RUN mkdir /var/run/sshd 20 | RUN echo 'root:radioml' | chpasswd 21 | RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config 22 | 23 | # somewhat more graphical packages.. 24 | RUN apt-get install -y python-opencv gimp 25 | RUN apt-get install -y firefox evince audacity meld 26 | 27 | # set up remove visual login packages ... 28 | RUN apt-get install -y xfwm4 xfce4 x2goserver x2goserver-xsession 29 | 30 | # install python packages 31 | RUN pip install --upgrade pip 32 | RUN pip install --upgrade ipython[all] 33 | RUN pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git 34 | RUN pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl 35 | RUN pip install --upgrade git+https://github.com/fchollet/keras.git 36 | RUN pip install --upgrade seaborn tqdm 37 | RUN pip install --upgrade pandas 38 | 39 | # set up gnuradio and related tools 40 | RUN apt-get install -y sudo 41 | 42 | # check out sources for reference 43 | RUN mkdir /root/src/ 44 | RUN cd /root/src/ && git clone https://github.com/Theano/Theano.git 45 | RUN cd /root/src/ && git clone https://github.com/tensorflow/tensorflow.git 46 | RUN cd /root/src/ && git clone https://github.com/fchollet/keras.git 47 | 48 | # Build PyOpenPNL and Gym deps 49 | RUN pip install networkx 50 | RUN apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig pypy-dev automake autoconf libtool 51 | RUN cd /root/src/ && git clone https://github.com/PyOpenPNL/OpenPNL.git && cd OpenPNL && ./autogen.sh && ./configure CFLAGS='-g -O2 -fpermissive -w' CXXFLAGS='-g -O2 -fpermissive -w' && make -j4 && make install 52 | RUN cd /root/src/ && git clone https://github.com/PyOpenPNL/PyOpenPNL.git && cd PyOpenPNL && python setup.py build && python setup.py install 53 | RUN cd /root/src/ && git clone https://github.com/osh/kerlym.git && cd kerlym && python setup.py build && python setup.py install 54 | 55 | # set up OpenAI Gym 56 | RUN cd /root/src/ && git clone https://github.com/openai/gym.git && cd gym && pip install -e . 57 | RUN pip install gym[atari] pachi_py 58 | RUN mkdir /root/src/notebooks/ 59 | 60 | # copy in some helpful files / set up env on login 61 | COPY .vimrc /root/ 62 | 63 | # generate jupyter config 64 | RUN jupyter notebook --generate-config 65 | RUN echo "c.NotebookApp.token = u''" >> ~/.jupyter/jupyter_notebook_config.py 66 | RUN echo "c.NotebookApp.ip = '*'" >> ~/.jupyter/jupyter_notebook_config.py 67 | RUN echo "c.NotebookApp.open_browser = False" >> ~/.jupyter/jupyter_notebook_config.py 68 | RUN echo "c.NotebookApp.port = 8888" >> ~/.jupyter/jupyter_notebook_config.py 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # RadioML Docker Image 3 | 4 | A docker image provided by https://radioml.com/ which provides many of the primitives needed for radio machine learning experimentation. 5 | 6 | ## Docker Image Contents 7 | 8 | - **Base:** Ubuntu 16.04 Xenial Xerus 9 | - **Remote:** ssh-server, x2go server + xfce4, ipython/jupyter notebook 10 | - **Misc:** screen, tmux, vim, emacs, git, meld 11 | - **DL:** Theano, TensorFlow, Keras, OpenAI Gym, KeRLym 12 | - **ML:** Scikit-learn, OpenCV, PyOpenPNL, Pandas 13 | - **SDR:** GNU Radio + several useful out-of-tree gr-modules 14 | 15 | ## Quickstart: Downloading and Running Pre-Built Docker-Hub Images 16 | 17 | The easiest way to use this image is to pull a pre-built version directly from docker hub 18 | 19 | ``` 20 | # Get the docker image from the whale cloud 21 | docker pull radioml/full 22 | 23 | # Run it (or use various running recipes below) 24 | docker run -i -t radioml/full /bin/bash 25 | ``` 26 | 27 | ## Building the Container 28 | 29 | Please note: your docker image max size must be >10GB for this build, please see Notes section. 30 | 31 | ``` 32 | git clone https://github.com/radioML/dockerRML.git rml 33 | cd rml && sudo docker build -t radioml/radioml . 34 | ``` 35 | 36 | This will take a while to build, so find something to do for an hour 37 | 38 | ## Running the Container 39 | 40 | To launch in foreground terminal 41 | ``` 42 | docker run -i -t radioml/radioml /bin/bash 43 | ``` 44 | 45 | To launch in background with ssh up (needed before x2go) 46 | ``` 47 | docker run -d -P --name test_rml radioml/radioml 48 | docker port test_rml 22 49 | docker port test_rml 8888 50 | ``` 51 | 52 | Connect with CLI 53 | ``` 54 | sudo docker exec -i -t test_rml /bin/bash 55 | ``` 56 | or 57 | ``` 58 | ssh root@`docker port test_rml 22` 59 | # use password radioml 60 | ``` 61 | 62 | Connect with x2go (good way to run GRC) 63 | ``` 64 | docker port test_rml 22 65 | x2goclient 66 | # set ssh ip and port from docker, login with root/radioml, use xfce as window manager 67 | ``` 68 | 69 | Connect with iPython Notebook (good way to run python experiments) 70 | ``` 71 | sudo docker exec -i -t test_rml /bin/bash 72 | screen 73 | cd /root/src/notebooks/ 74 | ipython notebook 75 | ``` 76 | now open http://docker_ip:8888 in the host browser 77 | 78 | ## Using the Image 79 | 80 | Launching GNU Radio Companion 81 | 82 | ``` 83 | gnuradio-companion 84 | ``` 85 | 86 | Running Keras Examples 87 | ``` 88 | cd /root/src/keras/examples 89 | python mnist_mlp.py 90 | ``` 91 | 92 | Running KeRLym Examples 93 | ``` 94 | cd /root/src/kerlym/examples 95 | KERAS_BACKEND='tensorflow' ./run_breakout.sh 96 | ``` 97 | 98 | Running PyOpenPNL Examples 99 | ``` 100 | cd /root/src/PyOpenPNL/examples 101 | ./simple_bnet.py 102 | ``` 103 | 104 | ## Notes 105 | 106 | - **GPU Support:** To build with GPU support for use with nvidia-docker, use dockerRML/full-GPU/Dockerfile 107 | - **Image Size:** Current sizes are Full: 10.3GB, Full-GPU: 10.5GB, MinimalML: 4.0GB, MinimalSDR: 8.3GB 108 | - **Build Time:** Building Full on an 8 core i7-5930K within an RHEL 7.2 KVM instance on a non-SSD raid takes just over 2 hours, YMMV 109 | - **Docker BaseSize:** default docker basesize is 10GB, you must increase this to 20GB or 50GB by adding ' --storage-opt dm.basesize=50G ' to DOCKER_OPTS in /etc/default/docker or /etc/sysconfig/docker and restarting the docker daeming (**This must be done before starting the build**) 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /full-GPU/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:7.5-cudnn4-devel 2 | MAINTAINER Tim O'Shea 3 | 4 | # set up environment 5 | ENV DEBIAN_FRONTEND noninteractive 6 | 7 | # update repos/ppas... 8 | RUN apt-get update 9 | RUN apt-get install -y python-software-properties software-properties-common 10 | RUN apt-add-repository -y ppa:x2go/stable 11 | RUN apt-get update 12 | 13 | # install core packages 14 | RUN apt-get install -y python-pip git openssh-server vim emacs screen tmux locate 15 | RUN apt-get install -y python-matplotlib python-scipy python-numpy 16 | RUN apt-get install -y python-sklearn python-sklearn-doc python-skimage python-skimage-doc python-scikits-learn python-scikits.statsmodels 17 | 18 | # Set up remove login info 19 | RUN mkdir /var/run/sshd 20 | RUN echo 'root:radioml' | chpasswd 21 | RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config 22 | 23 | # somewhat more graphical packages.. 24 | RUN apt-get install -y python-opencv gimp 25 | RUN apt-get install -y firefox evince audacity meld 26 | 27 | # set up remove visual login packages ... 28 | RUN apt-get install -y xfwm4 xfce4 x2goserver x2goserver-xsession 29 | 30 | # install python packages 31 | RUN pip install --upgrade pip 32 | RUN pip install --upgrade ipython[all] 33 | RUN pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git 34 | RUN pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl 35 | RUN pip install --upgrade git+https://github.com/fchollet/keras.git 36 | RUN pip install --upgrade seaborn tqdm 37 | RUN pip install --upgrade pandas 38 | 39 | # set up gnuradio and related tools 40 | RUN apt-get install -y autotools-dev autoconf sudo wireshark gdb 41 | RUN pip install --upgrade git+https://github.com/gnuradio/pybombs.git 42 | RUN mkdir /gr/ 43 | RUN cd /gr/ && pybombs prefix init . 44 | RUN cd /gr/ && pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git 45 | RUN cd /gr/ && pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git 46 | RUN cd /gr/ && pybombs install gnuradio gr-burst gr-pyqt gr-pcap gr-mapper gr-analysis gr-mediatools 47 | 48 | # check out sources for reference 49 | RUN /bin/ln -s /gr/src/ /root/src 50 | RUN cd /root/src/ && git clone https://github.com/Theano/Theano.git 51 | RUN cd /root/src/ && git clone https://github.com/tensorflow/tensorflow.git 52 | RUN cd /root/src/ && git clone https://github.com/fchollet/keras.git 53 | 54 | # Build PyOpenPNL and Gym deps 55 | RUN pip install networkx 56 | RUN apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig pypy-dev 57 | RUN cd /root/src/ && git clone https://github.com/PyOpenPNL/OpenPNL.git && cd OpenPNL && ./autogen.sh && ./configure CFLAGS='-g -O2 -fpermissive -w' CXXFLAGS='-g -O2 -fpermissive -w' && make -j4 && make install 58 | RUN cd /root/src/ && git clone https://github.com/PyOpenPNL/PyOpenPNL.git && cd PyOpenPNL && python setup.py build && python setup.py install 59 | RUN cd /root/src/ && git clone https://github.com/osh/kerlym.git && cd kerlym && python setup.py build && python setup.py install 60 | 61 | # set up OpenAI Gym 62 | RUN cd /root/src/ && git clone https://github.com/openai/gym.git && cd gym && pip install -e . 63 | RUN pip install gym[atari] pachi_py 64 | RUN mkdir /root/src/notebooks/ 65 | 66 | # copy in some helpful files / set up env on login 67 | COPY .vimrc /root/ 68 | RUN echo "source /gr/setup_env.sh" >> /root/.bashrc 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Tim O'Shea 3 | 4 | # set up environment 5 | ENV DEBIAN_FRONTEND noninteractive 6 | 7 | # update repos/ppas... 8 | RUN apt-get update 9 | RUN apt-get install -y python-software-properties software-properties-common 10 | RUN apt-add-repository -y ppa:x2go/stable 11 | RUN apt-get update 12 | 13 | # install core packages 14 | RUN apt-get update && \ 15 | apt-get install -y python-pip git openssh-server vim emacs screen tmux locate \ 16 | python-matplotlib python-scipy python-numpy \ 17 | python-sklearn python-sklearn-doc python-skimage \ 18 | python-skimage-doc python-scikits-learn python-scikits.statsmodels \ 19 | python-opencv gimp \ 20 | firefox evince audacity meld \ 21 | xfwm4 xfce4 x2goserver x2goserver-xsession \ 22 | autotools-dev autoconf sudo wireshark gdb 23 | 24 | 25 | # Set up remove login info 26 | RUN mkdir /var/run/sshd 27 | RUN echo 'root:radioml' | chpasswd 28 | RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config 29 | 30 | # 31 | # Add interactive user for x2go 32 | # 33 | RUN adduser --gecos "X2Go User" --disabled-password x2go 34 | RUN echo "x2go:x2go" | chpasswd 35 | RUN mkdir -p /home/x2go/.jupyter /home/x2go/mnt 36 | COPY imagefiles-jupyter /home/x2go/.jupyter 37 | COPY imagefiles-sudo /etc/sudoers.d 38 | COPY .vimrc /home/x2go/ 39 | RUN echo "source /gr/setup_env.sh" >> /home/x2go/.bashrc 40 | 41 | VOLUME /home/x2go/mnt 42 | 43 | # install python packages 44 | RUN pip install --upgrade pip 45 | RUN pip install --upgrade ipython[all] 46 | RUN pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git 47 | RUN pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl 48 | RUN pip install --upgrade git+https://github.com/fchollet/keras.git 49 | RUN pip install --upgrade seaborn tqdm 50 | RUN pip install --upgrade pandas 51 | 52 | # set up gnuradio and related tools 53 | RUN pip install --upgrade git+https://github.com/gnuradio/pybombs.git 54 | RUN mkdir /gr/ 55 | RUN cd /gr/ && pybombs prefix init . 56 | RUN cd /gr/ && pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git 57 | RUN cd /gr/ && pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git 58 | RUN cd /gr/ && pybombs install gnuradio gr-burst gr-pyqt gr-pcap gr-mapper gr-analysis 59 | 60 | # check out sources for reference 61 | RUN /bin/ln -s /gr/src/ /home/x2go/src 62 | RUN cd /home/x2go/src/ && git clone https://github.com/Theano/Theano.git 63 | RUN cd /home/x2go/src/ && git clone https://github.com/tensorflow/tensorflow.git 64 | RUN cd /home/x2go/src/ && git clone https://github.com/fchollet/keras.git 65 | 66 | # Build PyOpenPNL and Gym deps 67 | RUN pip install networkx 68 | RUN apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig pypy-dev 69 | RUN cd /home/x2go/src/ && git clone https://github.com/PyOpenPNL/OpenPNL.git && cd OpenPNL && ./autogen.sh && ./configure CFLAGS='-g -O2 -fpermissive -w' CXXFLAGS='-g -O2 -fpermissive -w' && make -j4 && make install 70 | RUN cd /home/x2go/src/ && git clone https://github.com/PyOpenPNL/PyOpenPNL.git && cd PyOpenPNL && python setup.py build && python setup.py install 71 | RUN cd /home/x2go/src/ && git clone https://github.com/osh/kerlym.git && cd kerlym && python setup.py build && python setup.py install 72 | 73 | # set up OpenAI Gym 74 | RUN cd /home/x2go/src/ && git clone https://github.com/openai/gym.git && cd gym && pip install -e . 75 | RUN pip install gym[atari] pachi_py 76 | RUN mkdir /home/x2go/src/notebooks/ 77 | 78 | 79 | WORKDIR /home/x2go 80 | # copy in some helpful files / set up env on login 81 | COPY .vimrc /home/x2go/ 82 | RUN echo "source /gr/setup_env.sh" >> /home/x2go/.bashrc 83 | 84 | RUN apt-get install -y supervisor 85 | COPY imagefiles-supervisord /etc/supervisor/conf.d 86 | 87 | RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config 88 | 89 | # SSH login fix. Otherwise user is kicked off after login 90 | RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd 91 | 92 | ENV NOTVISIBLE "in users profile" 93 | RUN echo "export VISIBLE=now" >> /etc/profile 94 | 95 | RUN chown -R x2go /home/x2go 96 | 97 | EXPOSE 22 8888 98 | CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf", "-n"] 99 | --------------------------------------------------------------------------------