small tweaks.
This commit is contained in:
parent
a01578197a
commit
ae9513d7a9
@ -38,11 +38,17 @@ class MyDockerSpawner(DockerSpawner):
|
|||||||
if self.user.name in self.group_map:
|
if self.user.name in self.group_map:
|
||||||
group_list = self.group_map[self.user.name]
|
group_list = self.group_map[self.user.name]
|
||||||
# add team volume to volumes
|
# add team volume to volumes
|
||||||
for group_id in group_list:
|
for group_id in group_list: # one superuser gets upload rights.
|
||||||
self.volumes['shared-{}'.format(group_id)] = {
|
if self.user.name == 'hub-admin':
|
||||||
'bind': '/home/jovyan/%s'%(group_id),
|
self.volumes['shared-{}'.format(group_id)] = {
|
||||||
'mode': 'rw', # or ro for read-only
|
'bind': '/home/jovyan/%s'%(group_id),
|
||||||
}
|
'mode': 'rw', # or ro for read-only
|
||||||
|
}
|
||||||
|
else: # this "shared-" is part of the naming convention
|
||||||
|
self.volumes['shared-{}'.format(group_id)] = {
|
||||||
|
'bind': '/home/jovyan/%s'%(group_id),
|
||||||
|
'mode': 'ro',
|
||||||
|
}
|
||||||
if self.user.name == 'hub-admin': # if admin, allow userlist access
|
if self.user.name == 'hub-admin': # if admin, allow userlist access
|
||||||
self.volumes['%s/userlist'%(os.environ['HUB_LOC'])] = { 'bind': '/home/jovyan/userlist',
|
self.volumes['%s/userlist'%(os.environ['HUB_LOC'])] = { 'bind': '/home/jovyan/userlist',
|
||||||
'mode': 'rw' }
|
'mode': 'rw' }
|
||||||
|
2
makefile
2
makefile
@ -17,7 +17,7 @@ secrets/postgres.env:
|
|||||||
@echo "POSTGRES_PASSWORD=$(shell openssl rand -hex 32)" > $@
|
@echo "POSTGRES_PASSWORD=$(shell openssl rand -hex 32)" > $@
|
||||||
|
|
||||||
secrets/oauth.env:
|
secrets/oauth.env:
|
||||||
@echo "Generating postgres password in $@"
|
@echo "Generating hash key in $@"
|
||||||
@echo "HASH_SECRET_KEY=$(shell openssl rand -hex 32)" > $@
|
@echo "HASH_SECRET_KEY=$(shell openssl rand -hex 32)" > $@
|
||||||
|
|
||||||
login:
|
login:
|
||||||
|
@ -13,27 +13,25 @@ RUN apt-get update && \
|
|||||||
htop \
|
htop \
|
||||||
fonts-dejavu \
|
fonts-dejavu \
|
||||||
tzdata \
|
tzdata \
|
||||||
gfortran
|
gfortran \
|
||||||
|
gcc
|
||||||
RUN apt-get install -y gcc
|
|
||||||
|
|
||||||
# finish off with MPI dependencies
|
# finish off with MPI dependencies
|
||||||
RUN sudo apt-get install mpich libmpich-dev -y && \
|
RUN sudo apt-get install mpich libmpich-dev -y && rm -rf /var/lib/apt/lists/*
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
|
RUN conda update --all && conda install fenics
|
||||||
USER jovyan
|
USER jovyan
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache jupyterhub==$JUPYTERHUB_VERSION nbresuse
|
RUN python3 -m pip install --no-cache jupyterhub==$JUPYTERHUB_VERSION nbresuse
|
||||||
#RUN conda install -c conda-forge fenics
|
|
||||||
|
|
||||||
RUN python3 -m pip install ipyparallel mpi4py
|
RUN python3 -m pip install ipyparallel mpi4py
|
||||||
RUN ipython profile create --parallel --profile=mpi
|
RUN ipython profile create --parallel --profile=mpi
|
||||||
RUN echo "c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'" >> /home/jovyan/.ipython/profile_mpi/ipcluster_config.py
|
RUN echo "c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'" >> /home/jovyan/.ipython/profile_mpi/ipcluster_config.py
|
||||||
|
|
||||||
|
USER root
|
||||||
RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 ipython ipykernel kernda numpy pandas matplotlib ipywidgets yaml ipyparallel mpi4py
|
RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 ipython ipykernel kernda numpy pandas matplotlib ipywidgets yaml ipyparallel mpi4py
|
||||||
RUN /opt/conda/envs/python2/bin/ipython profile create --parallel --profile=mpi
|
RUN /opt/conda/envs/python2/bin/ipython profile create --parallel --profile=mpi
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
# Create a global kernelspec in the image and modify it so that it properly activates
|
# Create a global kernelspec in the image and modify it so that it properly activates
|
||||||
# the python2 conda environment.
|
# the python2 conda environment.
|
||||||
|
Loading…
Reference in New Issue
Block a user