Skip to main content
All CollectionsCloud Workstations on Code Ocean
Saving dependencies installed during (Cloud Workstation) runtime
Saving dependencies installed during (Cloud Workstation) runtime

How to record your dependencies and transfer it to your capsule.

Updated over a week ago

Changes saved to files in /code and /data  while in a Cloud Workstation session will be automatically synced back to the capsule you launched the session from.

This will not be the case for dependencies (libraries). You should note down any dependencies installed during a Cloud Workstation session and re-add them to your environment once you're back in the non-interactive capsule interface.

This article covers instructions for recording this via python and R commands.

Recording dependencies using Python

From a command line, use either pip freeze or conda list to record all dependencies, which you can then compare to the ones installed in your environment.

You can save these results to concrete files for later use as such:
conda list --export > /code/environment.yml
or
pip freeze >> /code/requirements.txt 

Recording dependencies using R

From an R prompt, use either sessionInfo()  or devtools::session_info()  (Use the devtools  command if you have devtools installed -- R environments typically come with this installed.). 

You can save this to a text file with something like:
writeLines(capture.output(sessionInfo()), "/code/meta_session_info.txt") 

Did this answer your question?