简体   繁体   中英

In datalab is there a way to permantly install software via apt and pip?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM