Added Nbgrader
This commit is contained in:
48
jupyterhub/Dockerfile
Normal file
48
jupyterhub/Dockerfile
Normal file
@@ -0,0 +1,48 @@
|
||||
FROM quay.io/jupyterhub/jupyterhub:latest
|
||||
|
||||
# Install system dependencies
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
gnupg \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
netcat \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Docker CLI (needed for DockerSpawner)
|
||||
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y docker-ce-cli \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Required packages
|
||||
RUN pip install --no-cache-dir \
|
||||
dockerspawner \
|
||||
jupyterhub-nativeauthenticator \
|
||||
jupyterhub-dummyauthenticator \
|
||||
nbgrader \
|
||||
psycopg2-binary
|
||||
|
||||
RUN mkdir -p /srv/nbgrader/exchange
|
||||
RUN chmod -R 777 /srv/nbgrader/exchange
|
||||
RUN mkdir -p /srv/nbgrader/courses
|
||||
RUN chown -R 1000:100 /srv/nbgrader
|
||||
|
||||
#RUN jupyter nbextension install --sys-prefix --py nbgrader --overwrite
|
||||
#RUN jupyter nbextension enable --sys-prefix --py nbgrader
|
||||
#RUN jupyter serverextension enable --sys-prefix --py nbgrader
|
||||
|
||||
# Set Workdir
|
||||
WORKDIR /srv/jupyterhub
|
||||
|
||||
# Generate Cookie Secret
|
||||
RUN openssl rand -hex 32 > /srv/jupyterhub/cookie_secret
|
||||
RUN chmod 600 /srv/jupyterhub/cookie_secret
|
||||
#ENV JUPYTERHUB_AUTH_TOKEN=$(openssl rand -hex 32)
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["jupyterhub", "-f", "/srv/jupyterhub/jupyterhub_config.py"]
|
Reference in New Issue
Block a user