I am trying to run the Ungraded Labs locally using JupyterLab.
While I can successfully download the individual .ipynb notebook file, I am struggling to transfer the entire workspace (including subfolders, datasets, and helper scripts).
Is there a recommended way to download or transfer the complete directory structure to my local environment? Or are these files restricted to the online platform’s file system?
From File→Open you should be able to find all files used in the Lab. It may happen that some libraries need to be consistent with what the Lab files use, therefore you need to check all files for the library versions and replicate them. That’s my idea.
If you are comfortable with linux shell commands, there is a way to package up and download all the files in one shot. Please see this thread for more information.
Footnote: that thread refers to assignments in the PyTorch course. I’m not familiar with the MLEP course so it’s possible that the Docker images used there may offer other commands besides tar for achieving the purpose of creating a compound “archive” file. E.g. zip may be easier to cope with if your local environment is Windows based. You can check and see if zip is provided in your case.
Then the next issue you will face is that you need to install all the packages required by the particular notebook. Here’s a thread which will at least get you started down that long and winding road.
I got it working! Here are the steps I took to set up the environment on my local machine:
Step 1: Prepare the files in the Online Lab Open a new Notebook cell and run the following commands: !pip list --format=freeze > requirements.txt (This creates a clean list of packages without local server paths). !tar -cvzf workspace_backup.tar.gz . (This packages the entire directory structure into one archive).
Step 2: Download & Local Setup
Download the workspace_backup.tar.gz file.
Create a new Python virtual environment (venv) on your local machine.
Unpack the downloaded archive into your project folder.
Activate the environment and install the dependencies:
pip install -r requirements.txt
Step 3: Register the Kernel To make the environment visible in JupyterLab, run: pip install ipykernelpython -m ipykernel install --user --name=my-final-project --display-name "Python (Lab-env)"
Step 4: Execute Open JupyterLab locally, open your notebook, and select the new kernel “Python (Lab-env)” from the top right menu.
Everything works now, except for the Serving/Docker parts, but that’s a different story