DockerJupyterServer
autogen.coding.jupyter.DockerJupyterServer #
DockerJupyterServer(*, custom_image_name=None, container_name=None, auto_remove=True, stop_container=True, docker_env={}, token=GenerateToken())
Bases: JupyterConnectable
Start a Jupyter kernel gateway server in a Docker container.
PARAMETER | DESCRIPTION |
---|---|
custom_image_name | Custom image to use. If this is None, then the bundled image will be built and used. The default image is based on quay.io/jupyter/docker-stacks-foundation and extended to include jupyter_kernel_gateway |
container_name | Name of the container to start. A name will be generated if None. |
auto_remove | If true the Docker container will be deleted when it is stopped. TYPE: |
stop_container | If true the container will be stopped, either by program exit or using the context manager TYPE: |
docker_env | Extra environment variables to pass to the running Docker container. |
token | Token to use for authentication. If GenerateToken is used, a random token will be generated. Empty string will be unauthenticated. TYPE: |
Source code in autogen/coding/jupyter/docker_jupyter_server.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
DEFAULT_DOCKERFILE class-attribute
instance-attribute
#
DEFAULT_DOCKERFILE = 'FROM quay.io/jupyter/docker-stacks-foundation\n\nSHELL ["/bin/bash", "-o", "pipefail", "-c"]\n\nUSER ${NB_UID}\nRUN mamba install --yes jupyter_kernel_gateway ipykernel && mamba clean --all -f -y && fix-permissions "${CONDA_DIR}" && fix-permissions "/home/${NB_USER}"\n\nENV TOKEN="UNSET"\nCMD python -m jupyter kernelgateway --KernelGatewayApp.ip=0.0.0.0 --KernelGatewayApp.port=8888 --KernelGatewayApp.auth_token="${TOKEN}" --JupyterApp.answer_yes=true --JupyterWebsocketPersonality.list_kernels=true\n\nEXPOSE 8888\n\nWORKDIR "${HOME}"\n'