-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gert-Jan
committed
Jul 2, 2019
0 parents
commit c9c6de6
Showing
16 changed files
with
231 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Gert-Jan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,17 @@ | ||
version: "3" | ||
services: | ||
compute: | ||
image: {{IMAGE}} | ||
ports: | ||
- "8888:8888" | ||
- "6006:6006" | ||
volumes: | ||
- simplest-sync:/home/jovyan/work/:nocopy | ||
command: bash -c "cd /home/jovyan/work/ && | ||
python setup.py develop && | ||
jupyter lab --allow-root --NotebookApp.token=''" | ||
|
||
|
||
volumes: | ||
simplest-sync: | ||
external: true |
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,17 @@ | ||
version: "3" | ||
compute: | ||
image: {{IMAGE}} | ||
runtime: nvidia | ||
ports: | ||
- "8888:8888" | ||
- "6006:6006" | ||
volumes: | ||
- simplest-sync:/home/jovyan/work/:nocopy | ||
command: bash -c "cd /home/jovyan/work/ && | ||
python setup.py develop && | ||
jupyter lab --allow-root --NotebookApp.token=''" | ||
|
||
|
||
volumes: | ||
simplest-sync: | ||
external: true |
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,5 @@ | ||
version: "2" | ||
|
||
syncs: | ||
simplest-sync: | ||
src: {{PROJECT_FOLDER}} |
Binary file not shown.
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,6 @@ | ||
ok Starting native_osx for sync simplest-sync | ||
ok simplest-sync container still running, restarting unison in container | ||
unison: stopped | ||
unison: started | ||
success Sync container started | ||
success Showing unison logs from your sync container: simplest-sync |
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,21 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
ARG BASE_CONTAINER=phimal/minimal | ||
FROM $BASE_CONTAINER | ||
|
||
LABEL maintainer="Gert-Jan Both" | ||
|
||
USER $NB_UID | ||
|
||
# Install Python 3 packages | ||
# Remove pyqt and qt pulled in for matplotlib since we're only ever going to | ||
# use notebook-friendly backends in these images | ||
RUN conda install --quiet --yes \ | ||
'tensorflow=1.13.*' &&\ | ||
conda install --quiet --yes -c pytorch pytorch-cpu=1.1.* &&\ | ||
conda clean --all -f -y && \ | ||
rm -rf $CONDA_DIR/share/jupyter/lab/staging && \ | ||
fix-permissions $CONDA_DIR && \ | ||
fix-permissions /home/$NB_USER | ||
|
||
USER root |
Binary file not shown.
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,61 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
FROM phimal/minimal:v0.5 | ||
|
||
LABEL maintainer="Gert-Jan Both" | ||
USER root | ||
|
||
# CUDA stuff. | ||
ENV CUDA_VERSION 10.0.130 | ||
ENV CUDA_PKG_VERSION 10-0=$CUDA_VERSION-1 | ||
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} | ||
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 | ||
ENV NVIDIA_VISIBLE_DEVICES all | ||
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility | ||
ENV NVIDIA_REQUIRE_CUDA "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411" | ||
ENV NCCL_VERSION 2.4.2 | ||
ENV CUDNN_VERSION 7.5.1.10 | ||
|
||
#Installing cuda | ||
RUN apt-get update && apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && \ | ||
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \ | ||
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \ | ||
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \ | ||
apt-get purge --autoremove -y curl && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
cuda-cudart-$CUDA_PKG_VERSION \ | ||
cuda-compat-10-0 && \ | ||
ln -s cuda-10.0 /usr/local/cuda && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# nvidia-container-runtime | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
cuda-libraries-$CUDA_PKG_VERSION \ | ||
cuda-nvtx-$CUDA_PKG_VERSION \ | ||
libnccl2=$NCCL_VERSION-1+cuda10.0 && \ | ||
apt-mark hold libnccl2 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libcudnn7=$CUDNN_VERSION-1+cuda10.0 && \ | ||
apt-mark hold libcudnn7 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Python 3 packages | ||
# Remove pyqt and qt pulled in for matplotlib since we're only ever going to | ||
# use notebook-friendly backends in these images | ||
RUN pip install tensorflow-gpu==1.13.* &&\ | ||
conda install --quiet --yes -c pytorch pytorch=1.1.* &&\ | ||
conda clean --all -f -y && \ | ||
rm -rf $CONDA_DIR/share/jupyter/lab/staging && \ | ||
fix-permissions $CONDA_DIR && \ | ||
fix-permissions /home/$NB_USER | ||
|
||
USER $NB_UID | ||
|
||
|
||
|
||
|
Binary file not shown.
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,6 @@ | ||
{ | ||
"cells": [], | ||
"metadata": {}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
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,45 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
ARG BASE_CONTAINER=jupyter/base-notebook:python-3.7.3 | ||
FROM $BASE_CONTAINER | ||
|
||
LABEL maintainer="Gert-Jan Both" | ||
|
||
USER root | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get update && \ | ||
apt-get -y install gcc mono-mcs && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Python 3 packages | ||
# Remove pyqt and qt pulled in for matplotlib since we're only ever going to | ||
# use notebook-friendly backends in these images | ||
RUN conda install --quiet --yes \ | ||
'pandas=0.24*' \ | ||
'matplotlib=3.0*' \ | ||
'seaborn=0.9*' \ | ||
'numpy=1.16.*' \ | ||
'setuptools=41.0.*' \ | ||
'git=2.20.*' && \ | ||
pip install jupyterlab-git &&\ | ||
conda remove --quiet --yes --force qt pyqt && \ | ||
conda clean --all -f -y && \ | ||
jupyter labextension install @jupyter-widgets/jupyterlab-manager@^0.38.* && \ | ||
jupyter labextension install [email protected].* && \ | ||
jupyter labextension install @jupyterlab/[email protected].* && \ | ||
jupyter labextension install @jupyterlab/[email protected].* && \ | ||
jupyter serverextension enable --py jupyterlab_git &&\ | ||
npm cache clean --force && \ | ||
rm -rf $CONDA_DIR/share/jupyter/lab/staging && \ | ||
rm -rf /home/$NB_USER/.cache/yarn && \ | ||
rm -rf /home/$NB_USER/.node-gyp && \ | ||
fix-permissions $CONDA_DIR && \ | ||
fix-permissions /home/$NB_USER | ||
|
||
# Import matplotlib the first time to build the font cache. | ||
ENV XDG_CACHE_HOME /home/$NB_USER/.cache/ | ||
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \ | ||
fix-permissions /home/$NB_USER | ||
|
||
USER $NB_UID |
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,15 @@ | ||
#!/bin/bash | ||
|
||
#First automatically find project directory | ||
cd ../ | ||
projectdir=$(pwd) | ||
cd config/ | ||
|
||
# Make docker-sync for project | ||
sed "s#{{PROJECT_FOLDER}}#$projectdir#g" docker_templates/docker-sync_template.yml > docker-sync.yml | ||
|
||
#Make docker-compose file dependent for cpu | ||
sed "s#{{IMAGE}}#phimal/cpu:latest#g" docker_templates/docker-compose_cpu.yml > docker-compose.yml | ||
|
||
# Run docker sync | ||
sudo docker-sync-stack start |
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,15 @@ | ||
#!/bin/bash | ||
|
||
#First automatically find project directory | ||
cd ../ | ||
projectdir=$(pwd) | ||
cd config/ | ||
|
||
# Make docker-sync for project | ||
sed "s#{{PROJECT_FOLDER}}#$projectdir#g" docker_templates/docker-sync_template.yml > docker-sync.yml | ||
|
||
#Make docker-compose file dependent for cpu | ||
sed "s#{{IMAGE}}#phimal/gpu:latest#g" docker_templates/docker-compose_template.yml > docker-compose.yml | ||
|
||
# Run docker sync | ||
sudo docker-sync-stack start |