build Dockerfile on latest version of docker-stack
This commit is contained in:
		
							
								
								
									
										3
									
								
								src/Dockerfile.header
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/Dockerfile.header
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
# Use NVIDIA CUDA as base image and run the same installation as in the other packages.
 | 
			
		||||
FROM nvidia/cuda:10.1-base-ubuntu18.04
 | 
			
		||||
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
 | 
			
		||||
							
								
								
									
										15
									
								
								src/Dockerfile.pytorch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/Dockerfile.pytorch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
# Install PyTorch dependencies
 | 
			
		||||
RUN conda install --quiet --yes \
 | 
			
		||||
    pyyaml mkl mkl-include setuptools cmake cffi typing && \
 | 
			
		||||
    conda clean --all -f -y && \
 | 
			
		||||
    fix-permissions $CONDA_DIR && \
 | 
			
		||||
    fix-permissions /home/$NB_USER
 | 
			
		||||
 | 
			
		||||
# Install PyTorch
 | 
			
		||||
RUN conda install -y -c pytorch \
 | 
			
		||||
    cudatoolkit=10.1 \
 | 
			
		||||
    'pytorch=1.3.1' \
 | 
			
		||||
    torchvision && \
 | 
			
		||||
    conda clean --all -f -y && \
 | 
			
		||||
    fix-permissions $CONDA_DIR && \
 | 
			
		||||
    fix-permissions /home/$NB_USER
 | 
			
		||||
							
								
								
									
										40
									
								
								src/Dockerfile.usefulpackages
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								src/Dockerfile.usefulpackages
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
# Update conda
 | 
			
		||||
RUN conda update -n base conda -y
 | 
			
		||||
 | 
			
		||||
USER root
 | 
			
		||||
 | 
			
		||||
# Install rpy2 to share data between Python and R
 | 
			
		||||
RUN conda install rpy2=2.9.4 plotly=4.4.1
 | 
			
		||||
RUN conda install -c conda-forge ipyleaflet
 | 
			
		||||
 | 
			
		||||
# Install important packages and Graphviz
 | 
			
		||||
RUN set -ex \
 | 
			
		||||
 && buildDeps=' \
 | 
			
		||||
    graphviz==0.11 \
 | 
			
		||||
' \
 | 
			
		||||
 && apt-get update \
 | 
			
		||||
 && apt-get -y install htop apt-utils graphviz libgraphviz-dev \
 | 
			
		||||
 && pip install --no-cache-dir $buildDeps
 | 
			
		||||
 | 
			
		||||
# Install various extensions
 | 
			
		||||
RUN jupyter labextension install @jupyterlab/github
 | 
			
		||||
RUN jupyter labextension install jupyterlab-drawio
 | 
			
		||||
RUN jupyter labextension install jupyter-leaflet
 | 
			
		||||
RUN jupyter labextension install @jupyterlab/plotly-extension
 | 
			
		||||
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
 | 
			
		||||
RUN pip install --no-cache-dir jupyter-tabnine==1.0.2  && \
 | 
			
		||||
  jupyter nbextension install --py jupyter_tabnine && \
 | 
			
		||||
  jupyter nbextension enable --py jupyter_tabnine && \
 | 
			
		||||
  jupyter serverextension enable --py jupyter_tabnine
 | 
			
		||||
RUN fix-permissions $CONDA_DIR
 | 
			
		||||
RUN conda install -c conda-forge jupyter_contrib_nbextensions && \
 | 
			
		||||
  conda install -c conda-forge jupyter_nbextensions_configurator && \
 | 
			
		||||
  jupyter nbextension enable codefolding/main
 | 
			
		||||
RUN jupyter labextension install @ijmbarr/jupyterlab_spellchecker
 | 
			
		||||
 | 
			
		||||
# Copying config and fix permissions
 | 
			
		||||
COPY jupyter_notebook_config.json /etc/jupyter/
 | 
			
		||||
RUN fix-permissions /home/$NB_USER
 | 
			
		||||
 | 
			
		||||
# Switch back to jovyan to avoid accidental container runs as root
 | 
			
		||||
USER $NB_UID
 | 
			
		||||
		Reference in New Issue
	
	Block a user