0

I am using google cloud platform datalab and I have the following "install_sw" notebook.

%%bash
apt-get update
apt-get -y install --allow-unauthenticated libsndfile1 librosa

and

!pip install librosa soundfile google-cloud-storage

Everytime I restart work on my notebooks, I have to run the install software notebook before I work on my regular notebook.

I tried to ssh to the compute instance and then connect to the docker container using the docker exec command. Once I am in the docker container I tried to apt-get install and pip install and the will install, but they do not change the notebook environment.

I do not how to configure dockers. Do I need to do something at the docker level to get this to work?

netskink
  • 4,033
  • 2
  • 34
  • 46
  • Are you trying to [build a custom image](https://docs.docker.com/get-started/part2/)? – David Maze Aug 03 '18 at 22:46
  • I don’t think so. I’m just trying to avoid having to run the same install software notebook each time. Would that be considered a custom image? – netskink Aug 03 '18 at 23:10

1 Answers1

0

See https://cloud.google.com/datalab/docs/how-to/adding-libraries#adding_python_libraries_to_a_cloud_datalab_instance.

You can follow option 3 to create your own custom image that extends the Datalab image.

yelsayed
  • 5,236
  • 3
  • 27
  • 38
  • I tried all the earlier options previously. I will attempt option 3 and get back to you. many thanks. – netskink Aug 04 '18 at 15:59