Spyder image
We could use repo2docker to build a Jupyter Notebook with Spyder: https://github.com/spyder-ide/binder-environments/
- Ensure repo2docker installed
- Clone the source code and add
sudotoapt.txt - Build image with arguments
--user-name jovyan --user-id 1000 - Add image to PrimeHub and start in
Safe Mode
Check repo2docker
Execute jupyter-repo2docker command to see if any output from the command
jupyter-repo2docker --help | head -10
usage: jupyter-repo2docker [-h] [--config CONFIG] [--json-logs]
[--image-name IMAGE_NAME] [--ref REF] [--debug]
[--no-build]
[--build-memory-limit BUILD_MEMORY_LIMIT]
[--no-run] [--publish PORTS] [--publish-all]
[--no-clean] [--push] [--volume VOLUMES]
[--user-id USER_ID] [--user-name USER_NAME]
[--env ENVIRONMENT] [--editable]
[--target-repo-dir TARGET_REPO_DIR]
[--appendix APPENDIX] [--subdir SUBDIR] [--version]
If command not found: jupyter-repo2docker shows, please install python3-pip and jupyter-repo2docker packages.
sudo apt install python3-pip
pip3 install jupyter-repo2docker
If bash: jupyter-repo2docker: command not found shows, please export ${HOME}/.local/bin file to PATH.
export PATH=${HOME}/.local/bin:${PATH}
Use repo2docker to build spyder docker image.
Git clone the source code
git clone https://github.com/spyder-ide/binder-environments/ && cd binder-environments
Switch to stable branch
git checkout spyder-stable
In the source, modify binder/apt.txt and add sudo in a line
echo "binder/sudo" > apt.txt
Build image
Build a image with the tag infuseai/spyder in the source directory (.)
jupyter-repo2docker --no-run --no-clean --user-name jovyan --user-id 1000 --push --image infuseai/spyder .
Then Check the docker image is successfully push to DockerHub.
Add Image to PrimeHub
After the image taggedinfuseai/spyder is pushed, add it to the PrimeHub and start Notebook with the image in Safe Mode.
Starting Spyder
Add Docker image into PrimeHub images function.

Start Notebook with the image in Safe Mode.

After starting the Notebook, click the Desktop VNC icon

Open Spyder via double-clicking the Spyder icon on the desktop

