Docker Community Forums

Share and learn in the Docker community.

Issue running Jupyter Kernel Gateway on Docker

(Abhinavshroff) #1

When executing the Docker container: When I try to pip install jupyter_kernel_gateway within docker I get a

PermissionError: [Errno 13] Permission denied: ‘/srv/notebooks/my_api.ipynb’ error.

While if I try using pip install --user jupyter_kernel_gateway then I get error
jupyter: ‘kernelgateway’ is not a Jupyter command.

What is the solution if I use pip install with --user

(Gary Forghetti) #2




FROM ubuntu:latest

CMD jupyter kernelgateway


RUN apt-get update -qq && \                                 
    apt-get install curl python3 -y && \
    apt install python3-venv python3-pip -y && \
    pip3 install jupyter_kernel_gateway

Build a docker image with python and Jupyter Kernel Gateway

docker image build -t my-container:latest .

Run a container from the docker image

🐳  gforghetti:[~/Downloads] $ docker container run -it --name web-server -d --publish 8888:8888 my-container:latest
🐳  gforghetti:[~/Downloads] $ docker container logs web-server
[KernelGatewayApp] Jupyter Kernel Gateway at