# From GPU Setup to Data Persistence: Accessing Network Storage Across Instances

Setting up GPU infrastructure for machine learning workloads is only one part of the workflow. Ensuring that datasets, models, and outputs remain available across different compute sessions is equally critical — especially for research environments.

NeevCloud GPU AI Service simplifies this by providing Network Storage, which remains persistent even if GPU instances are deleted and recreated.

This tutorial demonstrates an end-to-end workflow for provisioning a GPU, uploading data, and verifying persistence across instances.

***

## Prerequisites

Before you start, make sure you have:

* A NeevCloud account
* An SSH key
* Basic familiarity with terminal commands
* A sample dataset (image/PDF) on your local machine

***

## Step 1: Log in to NeevCloud Dashboard

1. Open your browser and navigate to the [NeevCloud Console](https://console.ai.neevcloud.com/).
2. Enter your credentials to log in.

***

## Step 2: Deploy RTX PRO 6000 GPU Instance

1. **Select GPU** — Choose NVIDIA RTX PRO 6000 Blackwell Server Edition.
2. **Configure Deployment**
   * Name: Auto-generated (can be modified)
   * Template: Pytorch Ubuntu 24.04 Template (or any template of your choice)
   * Instance Pricing: On-Demand
   * Networking: Default settings
   * SSH Access: Enable and add your SSH key
3. **Configure Storage** — Select Persistent Network Storage (first 100 GB is free to help you get started quickly).

> **Note:** Do not select Ephemeral or Local Disk Storage, as they do not retain data after instance deletion.

4. **Pricing Check** — Before launching, review the Pricing Summary to confirm configuration.
5. **Launch** — Click Deploy GPU and wait until the instance status shows Running.

***

## Step 3: Connect to the GPU via SSH

Navigate to the Instance **Detail View page** from the NeevCloud dashboard.

Copy the SSH command provided there and run it in your terminal:

```bash
ssh -i ~/.ssh/id_ed25519 root@<IP_ADDRESS> -p 22
```

> **Note:** If you encounter a "Host key verification failed" error after recreating an instance, run:
>
> ```bash
> ssh-keygen -R <IP_ADDRESS>
> ```

***

## Step 4: Verify GPU Configuration

Run:

```bash
nvidia-smi
```

This confirms:

* GPU availability
* Driver version
* CUDA support

***

## Step 5: Access Network Storage

From the same SSH session (GPU terminal), navigate to Network Storage:

```bash
cd /data
ls
df -h /data
```

> **Note:** Network Storage is automatically mounted at `/data`. No manual setup is required.

***

## Step 6: Set Up Python Virtual Environment in Network Storage

From the same SSH session (GPU terminal), create a project directory:

```bash
mkdir -p /data/project1/student1
cd /data/project1/student1
```

**Explanation:**

* `mkdir -p` → Creates the directory structure (even if parent folders don't exist)
* `/data/project1/student1` → Stores project files inside persistent Network Storage

Create a virtual environment:

```bash
python3 -m venv student1
```

**Explanation:** Creates an isolated Python environment named `student1` to manage dependencies separately.

Activate the environment:

```bash
source student1/bin/activate
```

**Explanation:** Activates the virtual environment so that all installed packages are limited to this environment.

Install dependencies:

```bash
pip install --upgrade pip
pip install opencv-python
```

**Explanation:**

* Upgrades `pip` to the latest version
* Installs OpenCV (`cv2`) for image processing

Deactivate when done:

```bash
deactivate
```

**Explanation:** Exits the virtual environment and returns to the system Python.

> **Note:** Since the virtual environment is created inside `/data`, all installed dependencies persist even after the GPU instance is deleted and recreated.

***

## Step 7: Upload and Verify Dataset

**1. Upload Dataset (from Local Machine)**

```bash
scp -i ~/.ssh/id_ed25519 -P 22 ~/Downloads/sample-image.jpg root@<IP_ADDRESS>:/data/
```

**Explanation:**

* `scp` → Secure Copy command used to transfer files
* `-i ~/.ssh/id_ed25519` → Specifies your SSH private key
* `-P 22` → SSH port
* `~/Downloads/sample-image.jpg` → File path on your local machine
* `root@<IP_ADDRESS>:/data/` → Destination path on the GPU instance

> **Note:** Run this command in your local system terminal, not inside the GPU instance.

**2. Verify Uploaded Data (in GPU Terminal)**

```bash
cd /data
ls
```

You should see `sample-image.jpg` in the `/data` directory.

***

## Step 8: Use Dataset with OpenCV (cv2)

**Activate Environment (in GPU Terminal):**

```bash
cd /data/project1/student1
source student1/bin/activate
```

**Start Python:**

```bash
python
```

```python
import cv2
img = cv2.imread('/data/sample-image.jpg')
print(img.shape)
```

**Expected Output:**

```
(1254, 1254, 3)
```

> **Note:**
>
> * This confirms that the dataset is successfully uploaded and accessible from `/data`.
> * It also verifies that the dataset can be directly used in ML workflows.

***

## Step 9: Delete GPU Instance

1. Go to NeevCloud Console
2. Select the running instance
3. Click Delete Instance

> **Note:** Do not delete the attached Network Storage.

***

## Step 10: Recreate GPU with Existing Network Storage

Deploy a new instance with the same configuration:

* Same GPU
* Same template

**Attach Existing Network Storage**

In the Storage section:

1. Select Network Storage as the storage type
2. In the Existing Storage dropdown, select your previously created storage (example: `neev-storage-xxxx (100GB)`)

> **Note:** Do not create a new storage volume. Make sure to select the existing storage to retain previously uploaded data and environments.

***

## Step 11: Verify Data and Environment Persistence

**Connect via SSH:**

```bash
ssh -i ~/.ssh/id_ed25519 root@<NEW_IP_ADDRESS> -p 22
```

**Navigate to storage:**

```bash
cd /data
ls
```

You should see previously uploaded files.

**Re-activate Virtual Environment:**

```bash
cd /data/project1/student1
source student1/bin/activate
```

**Re-run OpenCV Code**

Start Python:

```bash
python
```

Run:

```python
import cv2
img = cv2.imread('/data/sample-image.jpg')
print(img.shape)
```

No reinstallation of dependencies or environment setup was required after recreating the instance.

**Expected Output:**

You should see the same output as before, for example:

```
(1254, 1254, 3)
```

> **Note:** This confirms that:
>
> * The dataset persisted in `/data`
> * The virtual environment remained intact
> * Installed dependencies (like OpenCV) are still available
> * The workflow continues without any reconfiguration

***

## Conclusion

In this tutorial:

* GPU instance was successfully deployed
* Network Storage was attached and accessed
* Dataset was uploaded and used
* Python virtual environment was created in `/data`
* GPU instance was deleted and recreated
* Data and dependencies persisted across instances

Even after deleting and recreating the GPU instance, both datasets and installed dependencies remained available and usable, confirming true persistence across compute instances.

This makes NeevCloud GPU an ideal platform for:

* Academic research
* Multi-user environments
* Long-running ML workflows

For more information, refer to the official [NeevCloud documentation](https://docs.ai.neevcloud.com/).

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ai.neevcloud.com/tutorials/from-gpu-setup-to-data-persistence-accessing-network-storage-across-instances.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
