legendu-net / docker-jupyterhub-ds Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
c.Spawner.mem_limit = '6G'
Currently, there's only the root user in the Docker image and other users are created dynamically after launching a Docker container.
Since you are using JupyterHub,
it is probably better to create a fixed user with sudo permission so that you do NOT have do complicated setup in shell scripts.
Either switch to phusion/baseimage or create a supervisord image
https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/
https://medium.com/@gchudnov/trapping-signals-in-docker-containers-7a57fdda7d86
I find that extension @axlair/jupyterlab_vim is prebuilt. However, I cannot use vim mode. How to use it?
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/jvm'
A simple way to fix it is just install openjdk-8-jdk using apt-get
. A clean way is to make the the JVM installed by conda visible to other applications, i.e., setup environment variables correctly.
I'm on Ubuntu 20.04.
After running the command given below, which is suggested in http://www.legendu.net/en/blog/my-docker-images/#usage,
docker run -d --init \
--hostname jupyterhub-ds \
--log-opt max-size=50m \
-p 8000:8000 \
-p 5006:5006 \
-e DOCKER_USER=$(id -un) \
-e DOCKER_USER_ID=$(id -u) \
-e DOCKER_PASSWORD=$(id -un) \
-e DOCKER_GROUP_ID=$(id -g) \
-e DOCKER_ADMIN_USER=$(id -un) \
-v "$(pwd)":/workdir \
-v "$(dirname $HOME)":/home_host \
dclong/jupyterhub-ds /scripts/sys/init.sh
I can see the login page when I visit 127.0.0.1:8000. However, I'm not able to log in with my host username and password.
My password has only 4 characters consisting of only numbers. I wonder if this conflicts with the rule set in the docker image.
Hi I run the following script to start a container with my current user ahb
#/bin/bash
docker run -d \
--privileged=true \
--log-opt max-size=50m \
-p 8000:8000 \
-p 5006:5006 \
-e DOCKER_USER=`id -un` \
-e DOCKER_USER_ID=`id -u` \
-e DOCKER_PASSWORD=`id -un` \
-e DOCKER_GROUP_ID=`id -g` \
-e DOCKER_ADMIN_USER=`id -un` \
-e USER_MEM_LIMIT=4G \
-e USER_CPU_LIMIT=1 \
-v /workdir/`id -un`:/workdir \
-v /home:/home_host \
dclong/jupyterhub-ds
then I openup my browser and go to the localhost:8000 , I login successfully.
Then in the jupyterlab console when I click the notebook it says
Error
Invalid response: 403 Forbidden
and
Launcher Error
Cannot read property 'path' of undefined
But i can lanuch the console successfully.
Here is some output of my container logs that i think is useful
[I 2018-07-19 10:01:36.321 SingleUserNotebookApp handlers:153] Creating new notebook in /
[I 2018-07-19 10:01:36.488 SingleUserNotebookApp sign:396] Writing notebook-signing key to /home/ahb/.local/share/jupyter/notebook_secret
[W 2018-07-19 10:01:36.540 SingleUserNotebookApp web:1618] 403 POST /user/ahb/api/contents/?1531994496298 (127.0.0.1): Permission denied: Untitled.ipynb
[W 2018-07-19 10:01:36.541 SingleUserNotebookApp handlers:525] Permission denied: Untitled.ipynb
[I 2018-07-19 10:01:39.248 SingleUserNotebookApp handlers:153] Creating new notebook in /
[W 2018-07-19 10:01:39.339 SingleUserNotebookApp web:1618] 403 POST /user/ahb/api/contents/?1531994499223 (127.0.0.1): Permission denied: Untitled.ipynb
[W 2018-07-19 10:01:39.339 SingleUserNotebookApp handlers:525] Permission denied: Untitled.ipynb
How to fix this problem? Thank you. I need your help
Sympy module is needed when I use the image. I tried two ways to install it, but only the second way works.
pip3 install sympy
; Output:Requirement already satisfied: sympy in ./.local/lib/python3.8/site-packages (1.8)
Requirement already satisfied: mpmath>=0.19 in ./.local/lib/python3.8/site-packages (from sympy) (1.2.1)
FROM dclong/jupyterhub-ds
# GIT: https://github.com/dclong/docker-jupyterhub-ds.git
RUN pip3 install --no-cache-dir \
sympy
The image can be built successfully, and sympy module works.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.