File size: 1,917 Bytes
7b072d3
 
 
affe86a
 
7b072d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
affe86a
 
7b072d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
affe86a
7b072d3
 
affe86a
 
7b072d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
affe86a
 
7b072d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
affe86a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

# 🐳 Minimal Jupyter via SSH + Docker (Lambda Cloud)

This guide sets up Jupyter running **inside a Docker container** on your 
Lambda Cloud instance and forwards it securely to your local machine

---

## ✅ 1. SSH into your Lambda instance

On your local machine:

```bash
ssh -i <YOUR_SSH_KEY_PATH> ubuntu@<INSTANCE_IP>
```

Replace `<YOUR_SSH_KEY_PATH>` with your private key path and `<INSTANCE_IP>` with your instance's IP address.

---

## ✅ 2. Start your Docker container with Jupyter

Please replace the image URL with an image of your choosing. The BioNemo image has pytorch and datasets pre-installed 
as well as implementations of several Bio-FMs.
```bash
sudo docker run --gpus all --shm-size=64g -dit \
  --name bionemo \
  -p 8888:8888 \
  -v /home/ubuntu/bionemo_workspace:/workspace \
  nvcr.io/nvidia/clara/bionemo-framework:nightly
```

Enter the container:

```bash
sudo docker exec -it bionemo bash
```

---

## ✅ 3. Install Jupyter and other Python tools inside the container

Inside the container shell, replace the pip and git commands with the packages that you need.

```bash
pip install jupyter anndata
git clone https://huggingface.co/datasets/tahoebio/Tahoe-100M
```

Then launch Jupyter:

```bash
jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root
```

Note the access token printed in the terminal output (you’ll need it to log in).

---

## ✅ 4. Forward Jupyter port from remote to local

On your **local machine**, open a new terminal and run:
Please note that you can do the same port-forwarding setup to use VScode if you prefer.


```bash
ssh -i <YOUR_SSH_KEY_PATH> -L 8888:127.0.0.1:8888 ubuntu@<INSTANCE_IP>
```

Now visit:

```
http://localhost:8888/?token=<TOKEN>
```

Paste in the token you copied from the container output.

---

## ✅ Optional cleanup

To stop and remove the container:

```bash
sudo docker stop bionemo
sudo docker rm bionemo
```