https://github.com/wattai/pg-modal
A playground for modal: a serverless GPU service
https://github.com/wattai/pg-modal
modal python serverless-functions serverless-gpu
Last synced: over 1 year ago
JSON representation
A playground for modal: a serverless GPU service
- Host: GitHub
- URL: https://github.com/wattai/pg-modal
- Owner: wattai
- License: mit
- Created: 2024-11-18T14:25:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-20T13:50:21.000Z (over 1 year ago)
- Last Synced: 2025-02-05T05:35:50.648Z (over 1 year ago)
- Topics: modal, python, serverless-functions, serverless-gpu
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔥 Play gound for modal: a serverless GPU service
1. Install python package
```shell
pip install -e .
```
1. Setup modal
Run this command, and it will show you a URL to authentication.
```shell
python -m modal setup
```
Follow the instruction, then you will see an response like below.
```shell
Token verified successfully!
```
1. Run your first modal app
```shell
modal run scripts/001-calc-square.py
```
Once you run the command above, you will see the output like below.
```shell
✓ Initialized. View run at https://modal.com/apps/...
✓ Created objects.
├── 🔨 Created mount /home/wattai/dev/pg-modal/scripts/001-calc-square.py
└── 🔨 Created function square.
This code is running on a remote worker!
the square is 1764
Stopping app - local entrypoint completed.
✓ App completed. View run at https://modal.com/apps/...
```
Now that, you can see the result of `the square is 1764`.\
🎉 Happy hacking!!