Launch a Jupyter Notebook server. Specify the domain using environment variable
LLAMA_DOMAIN (default: localhost) and the port as
LLAMA_JUP_PORT (default: 8080).
load_notebook(remote, local, readonly=True, clobber=True)¶
Copy a distribution LLAMA JUPYTER notebook to the output directory (fetching it first from LLAMA S3 if necessary), set it as trusted, and set its permissions to readonly. Deletes the old notebook if present.
remote (RemoteFileCacher) – A
RemoteFileCacherinstance pointing to the file you want to load.
local (str or Path) – Local path relative to the
OUTPUT_DIRthat you’d like to save the remote file as.
readonly (bool, optional) – If
True, set the notebook to readonly mode so that user’s can’t accidentally break it. Set this to
Falseto allow editing when making changes to the notebook notebook (and remember to commit those changes with
llama dev upload).
clobber (bool, optional) – If
True, overwrite any existing notebook files. In production, you usually want this to be
Truesince it will ensure you get the latest version of the documentation. While developing, you probably want this to be
Falseso that you can keep incrementally modifying your notebook until you’re ready to commit the changes to LLAMA S3.
local – The path to the local Jupyter notebook.
- Return type
Get a list of running servers as stored in
SERVER_LIST_FILE. Returns a list of tuples of the form
server_urlis the URL that can be used to access the server and
mounted_pathis the path on the server that the jupyter notebook has mounted. Returns
SERVER_LIST_FILEdoes not exist.