Skip to content

Commit

Permalink
Explicitely opt-in as run_as_root
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Nov 20, 2023
1 parent e960cfc commit dd677da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tljh-plasma/tljh_plasma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def start(self, *args, **kwargs):
# mount volumes
self.volumes = {
os.path.join(
os.path.dirname(__file__), "entrypoint", "repo2docker-entrypoint"
os.path.dirname(__file__), "entrypoint", "entrypoint.sh"
): "/usr/local/bin/repo2docker-entrypoint",
self.shared_data_path: {"bind": "/srv/data", "mode": "ro"},
}
Expand Down Expand Up @@ -117,12 +117,14 @@ def tljh_custom_jupyterhub_config(c, tljh_config_file=CONFIG_FILE):
# increase the timeout to be able to pull larger Docker images
c.PlasmaSpawner.start_timeout = 120
c.PlasmaSpawner.pull_policy = "Never"
# c.PlasmaSpawner.remove = True
c.PlasmaSpawner.remove = False
c.PlasmaSpawner.default_url = "/lab"
# TODO: change back to jupyterhub-singleuser
c.PlasmaSpawner.cmd = ["/srv/conda/envs/notebook/bin/jupyterhub-singleuser"]
# set the default cpu and memory limits
c.PlasmaSpawner.args = ["--ResourceUseDisplay.track_cpu_percent=True"]
# explicitely opt-in to enable the custom entrypoint logic
c.PlasmaSpawner.run_as_root = True

# prevent PID 1 running in the Docker container to stop when child processes are killed
# see https://github.com/plasmabio/plasma/issues/191 for more info
Expand Down

0 comments on commit dd677da

Please sign in to comment.