handson-ml3 icon indicating copy to clipboard operation
handson-ml3 copied to clipboard

[BUG] Docker image issue.

Open Wang0293 opened this issue 1 year ago • 2 comments

I built the image with make build, and everything goes well. However, when I ran make run, it showed:

[+] Running 1/0 ✔ Container handson-ml3 Created 0.0s Attaching to handson-ml3 handson-ml3 | usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] handson-ml3 | [--paths] [--json] [--debug] handson-ml3 | [subcommand] handson-ml3 | handson-ml3 | Jupyter: Interactive Computing handson-ml3 | handson-ml3 | positional arguments: handson-ml3 | subcommand the subcommand to launch handson-ml3 | handson-ml3 | options: handson-ml3 | -h, --help show this help message and exit handson-ml3 | --version show the versions of core jupyter packages and exit handson-ml3 | --config-dir show Jupyter config dir handson-ml3 | --data-dir show Jupyter data dir handson-ml3 | --runtime-dir show Jupyter runtime dir handson-ml3 | --paths show all Jupyter paths. Add --json for machine-readable handson-ml3 | format. handson-ml3 | --json output paths as machine-readable json handson-ml3 | --debug output debug information about paths handson-ml3 | handson-ml3 | Available subcommands: dejavu events execute kernel kernelspec lab handson-ml3 | labextension labhub migrate nbconvert run server troubleshoot trust handson-ml3 | handson-ml3 | Jupyter command jupyter-notebook not found. handson-ml3 exited with code 0

So I tried jupyter --version in the same container bash, and it showed:

Selected Jupyter core packages... IPython : 8.17.2 ipykernel : 6.26.0 ipywidgets : 8.1.1 jupyter_client : 8.6.0 jupyter_core : 5.5.0 jupyter_server : 2.11.2 jupyterlab : 4.0.9 nbclient : 0.8.0 nbconvert : 7.12.0 nbformat : 5.9.2 notebook : not installed qtconsole : not installed traitlets : 5.14.0.0

Obviously, notebook not installed. Maybe some modification needed?

Wang0293 avatar Dec 05 '23 10:12 Wang0293

I'm actually getting the same issue when I install the env on MacOS Intel

anthony@*********~/P/handson-ml3> jupyter --version                                         (homl3) 18:40:12
Selected Jupyter core packages...
IPython          : 8.17.2
ipykernel        : 6.28.0
ipywidgets       : 8.1.1
jupyter_client   : 8.6.0
jupyter_core     : 5.6.0
jupyter_server   : 2.12.1
jupyterlab       : 4.0.9
nbclient         : 0.8.0
nbconvert        : 7.13.1
nbformat         : 5.9.2
notebook         : not installed
qtconsole        : not installed
traitlets        : 5.14.0

As you would expect, pip install notebook fixes the issue

antoooooooooooonie avatar Dec 29 '23 17:12 antoooooooooooonie

Thanks for your feedback, and sorry for the late response. Indeed, adding pip install notebook fixes the issue. Another solution is to switch to Jupyter lab. I've chosen the second option, because I prefer Jupyter lab now, and I updated the Dockerfile and docker-compose.yml, everything should work now. Note that I've also pushed the updated docker image to the Docker hub, so you can just docker pull ageron/handson-ml3:latest or latest-gpu. Thanks again!

ageron avatar Jan 31 '24 22:01 ageron