Skip to content

Instantly share code, notes, and snippets.

@jeroavf
Last active April 1, 2021 18:11
Show Gist options
  • Save jeroavf/6111e0cf069f2b92a7f18ea56cded1ee to your computer and use it in GitHub Desktop.
Save jeroavf/6111e0cf069f2b92a7f18ea56cded1ee to your computer and use it in GitHub Desktop.

My setup for running tensorman (https://github.com/pop-os/tensorman) with opencv and jupyter :

On host command line:

mkdir ambiente 
cd ./ambiente 
tensorman run -p 8888:8888 --gpu --python3 --jupyter --root --name container_name bash

Inside running container:

apt-get update 
apt-get install -y libsm6 libxext6 libxrender-dev python3-opencv
pip install -r requirements.txt 

Contents of requirements.txt:

opencv-python
matplotlib
scikit-image
scikit-learn 
tf-explain
jupyter 

Launch another window on host while container is still running and run the command below, to save the container as an container image:

tensorman save container_name container_image_name 

To execute the image created from the saved container:

cd ambiente
tensorman "=container_image_name" run -p 8888:8888 --gpu --python3 --jupyter --name new_container_name bash

Inside the running container, call jupyter:

jupyter notebook --ip=0.0.0.0 --no-browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment