nami-surf 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nami_surf-0.1.0/LICENSE +21 -0
- nami_surf-0.1.0/PKG-INFO +133 -0
- nami_surf-0.1.0/README.md +114 -0
- nami_surf-0.1.0/nami/__init__.py +6 -0
- nami_surf-0.1.0/nami/cli.py +474 -0
- nami_surf-0.1.0/nami/connection.py +218 -0
- nami_surf-0.1.0/nami/transfer/__init__.py +1 -0
- nami_surf-0.1.0/nami/transfer/rsync.py +73 -0
- nami_surf-0.1.0/nami/transfer/s3.py +131 -0
- nami_surf-0.1.0/nami/util.py +19 -0
- nami_surf-0.1.0/nami_surf.egg-info/PKG-INFO +133 -0
- nami_surf-0.1.0/nami_surf.egg-info/SOURCES.txt +16 -0
- nami_surf-0.1.0/nami_surf.egg-info/dependency_links.txt +1 -0
- nami_surf-0.1.0/nami_surf.egg-info/entry_points.txt +2 -0
- nami_surf-0.1.0/nami_surf.egg-info/requires.txt +3 -0
- nami_surf-0.1.0/nami_surf.egg-info/top_level.txt +1 -0
- nami_surf-0.1.0/pyproject.toml +37 -0
- nami_surf-0.1.0/setup.cfg +4 -0
nami_surf-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alexander Lutsenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
nami_surf-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: nami-surf
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Node Administration Made Intuitive
|
|
5
|
+
Author-email: Alexander Lutsenko <lex.lutsenko@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/AlexanderLutsenko/nami
|
|
7
|
+
Project-URL: Repository, https://github.com/AlexanderLutsenko/nami
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/AlexanderLutsenko/nami/issues
|
|
9
|
+
Keywords: ssh,rsync,s3,remote,administration,automation
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: PyYAML>=6.0
|
|
17
|
+
Requires-Dist: paramiko>=3.4.0
|
|
18
|
+
Requires-Dist: sty>=1.0.0
|
|
19
|
+
|
|
20
|
+
# NAMI 🌊
|
|
21
|
+
|
|
22
|
+
**N**ode **A**ccess & **M**anipulation **I**nterface is a simple tool for managing connections to multiple remote instances (particularly GPU servers), with built-in GPU monitoring, file transfer capabilities via rsync/S3, and a template system for common tasks.
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
- **🔗 Multi-instance SSH management** - Add, list, and connect to remote servers
|
|
27
|
+
- **🌐 Heterogeneous environments** - Works across different Linux distros and cloud providers (Vast, AWS, Runpod, etc.)
|
|
28
|
+
- **📊 GPU monitoring** - GPU utilization and memory tracking
|
|
29
|
+
- **📁 File transfer** - Transfer files between instances directly via rsync or using S3 as intermediary
|
|
30
|
+
- **📜 Template system** - Execute pre-configured bash script templates on remote instances
|
|
31
|
+
- **⚙️ Configuration management** - Personal and global configuration storage
|
|
32
|
+
|
|
33
|
+
### Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install -U nami
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Quick Start
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Add a remote instance
|
|
43
|
+
nami add gpu-box 192.168.1.100 22 --user ubuntu --description "Main GPU server"
|
|
44
|
+
|
|
45
|
+
# List all instances with GPU status
|
|
46
|
+
nami list
|
|
47
|
+
|
|
48
|
+
# Connect to an instance via SSH
|
|
49
|
+
nami ssh gpu-box
|
|
50
|
+
|
|
51
|
+
# Run a command on an instance
|
|
52
|
+
nami ssh gpu-box "nvidia-smi"
|
|
53
|
+
|
|
54
|
+
# Transfer files between instances
|
|
55
|
+
nami transfer --source_instance local --dest_instance gpu-box --source_path ./data --dest_path ~/data
|
|
56
|
+
|
|
57
|
+
# Upload files to S3 from an instance
|
|
58
|
+
nami to_s3 --source_instance gpu-box --source_path ~/results --dest_path s3://bucket/experiment1/
|
|
59
|
+
|
|
60
|
+
# Download files from S3 to an instance
|
|
61
|
+
nami from_s3 --dest_instance gpu-box --source_path s3://bucket/dataset/ --dest_path ~/data/
|
|
62
|
+
|
|
63
|
+
# Execute a template on an instance
|
|
64
|
+
nami template gpu-box setup_conda --env_name myenv --python_version 3.9
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### ⚙️ Configuration
|
|
68
|
+
|
|
69
|
+
NAMI stores its configuration in `~/.nami/`:
|
|
70
|
+
|
|
71
|
+
- `config.yaml` - Instance definitions and global settings
|
|
72
|
+
- `personal.yaml` - User-specific configurations (S3 bucket, AWS profile, etc.)
|
|
73
|
+
- `templates/` - Custom bash script templates
|
|
74
|
+
|
|
75
|
+
### 🔧 Commands
|
|
76
|
+
|
|
77
|
+
**Instance Management:**
|
|
78
|
+
```bash
|
|
79
|
+
# Add a new instance
|
|
80
|
+
nami add <name> <host> <port> [--user USER] [--local-port PORT] [--description DESC]
|
|
81
|
+
|
|
82
|
+
# List all instances with GPU status
|
|
83
|
+
nami list
|
|
84
|
+
|
|
85
|
+
# Remove an instance
|
|
86
|
+
nami remove <name>
|
|
87
|
+
|
|
88
|
+
# Connect via SSH or run a command
|
|
89
|
+
nami ssh <instance> [command]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Configuration:**
|
|
93
|
+
```bash
|
|
94
|
+
# Set personal config value
|
|
95
|
+
nami config set <key> <value>
|
|
96
|
+
|
|
97
|
+
# Show configuration (all or specific key)
|
|
98
|
+
nami config show [key]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**File Transfer:**
|
|
102
|
+
```bash
|
|
103
|
+
# Transfer files between instances
|
|
104
|
+
nami transfer --source_instance SRC --dest_instance DEST \
|
|
105
|
+
--source_path PATH \
|
|
106
|
+
[--dest_path PATH] \
|
|
107
|
+
[--method rsync|s3] \
|
|
108
|
+
[--exclude PATTERNS] \
|
|
109
|
+
[--archive] \
|
|
110
|
+
[--rsync_opts "OPTIONS"]
|
|
111
|
+
|
|
112
|
+
# Upload to S3
|
|
113
|
+
nami to_s3 --source_instance INSTANCE \
|
|
114
|
+
--source_path PATH \
|
|
115
|
+
--dest_path S3_PATH \
|
|
116
|
+
[--exclude PATTERNS] \
|
|
117
|
+
[--archive] \
|
|
118
|
+
[--aws_profile PROFILE]
|
|
119
|
+
|
|
120
|
+
# Download from S3
|
|
121
|
+
nami from_s3 --dest_instance INSTANCE \
|
|
122
|
+
--source_path S3_PATH \
|
|
123
|
+
--dest_path PATH \
|
|
124
|
+
[--exclude PATTERNS] \
|
|
125
|
+
[--archive] \
|
|
126
|
+
[--aws_profile PROFILE]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Templates:**
|
|
130
|
+
```bash
|
|
131
|
+
# Execute a template with variables
|
|
132
|
+
nami template <instance> <template_name> [--var1 value1 --var2 value2 ...]
|
|
133
|
+
```
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# NAMI 🌊
|
|
2
|
+
|
|
3
|
+
**N**ode **A**ccess & **M**anipulation **I**nterface is a simple tool for managing connections to multiple remote instances (particularly GPU servers), with built-in GPU monitoring, file transfer capabilities via rsync/S3, and a template system for common tasks.
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **🔗 Multi-instance SSH management** - Add, list, and connect to remote servers
|
|
8
|
+
- **🌐 Heterogeneous environments** - Works across different Linux distros and cloud providers (Vast, AWS, Runpod, etc.)
|
|
9
|
+
- **📊 GPU monitoring** - GPU utilization and memory tracking
|
|
10
|
+
- **📁 File transfer** - Transfer files between instances directly via rsync or using S3 as intermediary
|
|
11
|
+
- **📜 Template system** - Execute pre-configured bash script templates on remote instances
|
|
12
|
+
- **⚙️ Configuration management** - Personal and global configuration storage
|
|
13
|
+
|
|
14
|
+
### Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install -U nami
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Add a remote instance
|
|
24
|
+
nami add gpu-box 192.168.1.100 22 --user ubuntu --description "Main GPU server"
|
|
25
|
+
|
|
26
|
+
# List all instances with GPU status
|
|
27
|
+
nami list
|
|
28
|
+
|
|
29
|
+
# Connect to an instance via SSH
|
|
30
|
+
nami ssh gpu-box
|
|
31
|
+
|
|
32
|
+
# Run a command on an instance
|
|
33
|
+
nami ssh gpu-box "nvidia-smi"
|
|
34
|
+
|
|
35
|
+
# Transfer files between instances
|
|
36
|
+
nami transfer --source_instance local --dest_instance gpu-box --source_path ./data --dest_path ~/data
|
|
37
|
+
|
|
38
|
+
# Upload files to S3 from an instance
|
|
39
|
+
nami to_s3 --source_instance gpu-box --source_path ~/results --dest_path s3://bucket/experiment1/
|
|
40
|
+
|
|
41
|
+
# Download files from S3 to an instance
|
|
42
|
+
nami from_s3 --dest_instance gpu-box --source_path s3://bucket/dataset/ --dest_path ~/data/
|
|
43
|
+
|
|
44
|
+
# Execute a template on an instance
|
|
45
|
+
nami template gpu-box setup_conda --env_name myenv --python_version 3.9
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### ⚙️ Configuration
|
|
49
|
+
|
|
50
|
+
NAMI stores its configuration in `~/.nami/`:
|
|
51
|
+
|
|
52
|
+
- `config.yaml` - Instance definitions and global settings
|
|
53
|
+
- `personal.yaml` - User-specific configurations (S3 bucket, AWS profile, etc.)
|
|
54
|
+
- `templates/` - Custom bash script templates
|
|
55
|
+
|
|
56
|
+
### 🔧 Commands
|
|
57
|
+
|
|
58
|
+
**Instance Management:**
|
|
59
|
+
```bash
|
|
60
|
+
# Add a new instance
|
|
61
|
+
nami add <name> <host> <port> [--user USER] [--local-port PORT] [--description DESC]
|
|
62
|
+
|
|
63
|
+
# List all instances with GPU status
|
|
64
|
+
nami list
|
|
65
|
+
|
|
66
|
+
# Remove an instance
|
|
67
|
+
nami remove <name>
|
|
68
|
+
|
|
69
|
+
# Connect via SSH or run a command
|
|
70
|
+
nami ssh <instance> [command]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Configuration:**
|
|
74
|
+
```bash
|
|
75
|
+
# Set personal config value
|
|
76
|
+
nami config set <key> <value>
|
|
77
|
+
|
|
78
|
+
# Show configuration (all or specific key)
|
|
79
|
+
nami config show [key]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**File Transfer:**
|
|
83
|
+
```bash
|
|
84
|
+
# Transfer files between instances
|
|
85
|
+
nami transfer --source_instance SRC --dest_instance DEST \
|
|
86
|
+
--source_path PATH \
|
|
87
|
+
[--dest_path PATH] \
|
|
88
|
+
[--method rsync|s3] \
|
|
89
|
+
[--exclude PATTERNS] \
|
|
90
|
+
[--archive] \
|
|
91
|
+
[--rsync_opts "OPTIONS"]
|
|
92
|
+
|
|
93
|
+
# Upload to S3
|
|
94
|
+
nami to_s3 --source_instance INSTANCE \
|
|
95
|
+
--source_path PATH \
|
|
96
|
+
--dest_path S3_PATH \
|
|
97
|
+
[--exclude PATTERNS] \
|
|
98
|
+
[--archive] \
|
|
99
|
+
[--aws_profile PROFILE]
|
|
100
|
+
|
|
101
|
+
# Download from S3
|
|
102
|
+
nami from_s3 --dest_instance INSTANCE \
|
|
103
|
+
--source_path S3_PATH \
|
|
104
|
+
--dest_path PATH \
|
|
105
|
+
[--exclude PATTERNS] \
|
|
106
|
+
[--archive] \
|
|
107
|
+
[--aws_profile PROFILE]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Templates:**
|
|
111
|
+
```bash
|
|
112
|
+
# Execute a template with variables
|
|
113
|
+
nami template <instance> <template_name> [--var1 value1 --var2 value2 ...]
|
|
114
|
+
```
|