Skip to content

Commit 4e87355

Browse files
committed
IT-4364: give Jupypter notebook user sudo access within container
1 parent ef3262b commit 4e87355

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/ec2/sc-ec2-linux-docker-notebook.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,11 @@ Resources:
338338
-e DOCKER_STACKS_JUPYTER_CMD=notebook \
339339
-e SYNAPSE_TOKEN_AWS_SSM_PARAMETER_NAME=${SYNAPSE_TOKEN_AWS_SSM_PARAMETER_NAME} \
340340
-e AWS_DEFAULT_REGION=${AWS_REGION} \
341+
# from
342+
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#docker-options
343+
# to give user 'sudo' ability inside the notebook, add the env var
344+
# 'GRANT_SUDO=yes' and run the container as 'root'
345+
-e GRANT_SUDO=yes --user root\
341346
-v ${WORK_VOLUME_NAME}:${JUPYTER_WORK_DIR} \
342347
--network ${NETWORK_NAME} ${DOCKER_IMAGE} \
343348
bash -c "start-notebook.py --IdentityProvider.token='' --NotebookApp.base_url=/${EC2_INSTANCE_ID} \

0 commit comments

Comments
 (0)