Skip to content

feat: AE-811 Add a class to create network volume using REST - #53

Merged
pandyamarut merged 17 commits into
mainfrom
feat/ae-835-create-net-vol
Jul 10, 2025
Merged

feat: AE-811 Add a class to create network volume using REST#53
pandyamarut merged 17 commits into
mainfrom
feat/ae-835-create-net-vol

Conversation

@pandyamarut

@pandyamarut pandyamarut commented Jul 8, 2025

Copy link
Copy Markdown
Contributor
import asyncio
import base64
import io
from PIL import Image
from tetra_rp import remote, LiveServerless, GpuGroup

# Configuration for a GPU resource
sd_config = LiveServerless(
    gpus=[GpuGroup.AMPERE_80],
    name="example_image_gen_server",
)


@remote(
    resource_config=sd_config,
    dependencies=["diffusers", "transformers", "torch", "accelerate", "safetensors"],
    mount_volume=NetworkVolume(
        size=10,  # Size in GB
        dataCenterId="EU-RO-1",
        name="tetra-network-volume",
    ), # or You can pass it as: 
    
@remote(
    resource_config=sd_config,
    dependencies=["diffusers", "transformers", "torch", "accelerate", "safetensors"],
    mount_volume=NetworkVolume(
        id="network_volume_id",
    ),
)


)
def test_run():
    return "Hello from remote serverless function!"

async def main():
    test_run_result = await test_run()
    print(f"Remote function result: {test_run_result}")
    
if __name__ == "__main__":
    asyncio.run(main())

With this PR, you can mount the network volume to use with tetra function classes.

Signed-off-by: pandyamarut <pandyamarut@gmail.com>
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut requested a review from deanq July 8, 2025 05:59
@pandyamarut
pandyamarut marked this pull request as draft July 8, 2025 21:14
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut force-pushed the feat/ae-835-create-net-vol branch from 45b01eb to 62ba9cf Compare July 8, 2025 23:51
@pandyamarut
pandyamarut marked this pull request as ready for review July 8, 2025 23:51
Comment thread src/tetra_rp/client.py
Comment thread src/tetra_rp/client.py Outdated
Comment thread src/tetra_rp/client.py Outdated
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut force-pushed the feat/ae-835-create-net-vol branch from cf43c0a to fbc7def Compare July 9, 2025 20:07
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut force-pushed the feat/ae-835-create-net-vol branch from f43b21d to 6779b75 Compare July 9, 2025 21:16
Comment thread src/tetra_rp/core/resources/serverless.py Outdated
Comment thread src/tetra_rp/core/resources/serverless.py Outdated
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut requested a review from deanq July 9, 2025 23:11
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut force-pushed the feat/ae-835-create-net-vol branch from 7ab1b7e to 4c2fe45 Compare July 9, 2025 23:21
Comment thread src/tetra_rp/core/resources/serverless.py Outdated
Comment thread src/tetra_rp/core/resources/serverless.py Outdated
Comment thread src/tetra_rp/core/resources/serverless.py Outdated
Comment thread src/tetra_rp/core/resources/serverless.py Outdated
Comment thread src/tetra_rp/core/resources/serverless.py Outdated
@pandyamarut
pandyamarut force-pushed the feat/ae-835-create-net-vol branch from 468cc7d to 4c2fe45 Compare July 10, 2025 00:49
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut force-pushed the feat/ae-835-create-net-vol branch from 9617196 to e506a91 Compare July 10, 2025 00:51
@pandyamarut
pandyamarut requested a review from deanq July 10, 2025 00:56
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
Comment thread src/tetra_rp/core/resources/network_volume.py Outdated
Comment thread src/tetra_rp/core/api/runpod.py Outdated
Comment thread src/tetra_rp/core/resources/network_volume.py Outdated
Comment thread src/tetra_rp/client.py Outdated
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut requested a review from deanq July 10, 2025 01:57
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut force-pushed the feat/ae-835-create-net-vol branch from d438462 to 1aeaf17 Compare July 10, 2025 01:58
@pandyamarut
pandyamarut merged commit abb82b7 into main Jul 10, 2025
7 checks passed
@pandyamarut
pandyamarut deleted the feat/ae-835-create-net-vol branch July 10, 2025 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants