A fast, efficient command-line tool for managing files between your AI Platform notebook workspace and network volumes (S3-compatible storage).
- Simple git-like commands - Familiar
ls,pull,pushinterface - Fast uploads - 10 parallel threads for files larger than 16MB
# Linux (x86_64)
curl -L https://github.com/vngcloud/aiplatform-util/releases/latest/download/aiplatform-util_Linux_x86_64.tar.gz | tar xz
chmod +x aiplatform-util
sudo mv aiplatform-util /usr/local/bin/You can configure credentials in two ways:
Option 1: Environment Variables
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_ENDPOINT=https://hcm04.vstorage.vngcloud.vn:443/
export S3_BUCKET=your-bucket-name
export MOUNT_PATH=/workspace/ # Optional, defaults to ~/test/workspaceOption 2: Pre-Configuration Files in notebook AIPlatform VNGcloud
Create files in /etc/config-nv/:
# These files are typically pre-mounted in AI Platform notebook environments
cat /etc/config-nv/AWS_ACCESS_KEY_ID
cat /etc/config-nv/AWS_SECRET_ACCESS_KEY
cat /etc/config-nv/AWS_ENDPOINT
cat /etc/config-nv/S3_BUCKET
cat /etc/config-nv/MOUNT_PATHPriority: Environment variables take precedence over configuration files in
/etc/config-nv/.
# List files in your network volume
aiplatform-util nv ls
# Download files to your workspace
aiplatform-util nv pull
# Upload your work to network volume
aiplatform-util nv pushShow all files in your network volume:
aiplatform-util nv lsOptions:
--prefix <path>- List files under a specific directory--recursive- List all files recursively (default: true)
Examples:
# List all files
aiplatform-util nv ls
# List files in models directory
aiplatform-util nv ls --prefix models/
# List only top-level items (no recursion)
aiplatform-util nv ls --recursive=falseDownload files from network volume to your local workspace:
aiplatform-util nv pullOptions:
--prefix <path>- Pull only files under a specific directory--dry-run- Preview what would be downloaded without actually downloading--delete- Delete local files that don't exist in the network volume
Examples:
# Pull all files
aiplatform-util nv pull
# Pull only the models directory
aiplatform-util nv pull --prefix models/
# See what would be pulled without downloading
aiplatform-util nv pull --dry-run
# Pull and remove local files not in remote
aiplatform-util nv pull --deleteUpload files from your workspace to the network volume:
aiplatform-util nv pushOptions:
--prefix <path>- Push only files under a specific directory--dry-run- Preview what would be uploaded without actually uploading--delete- Delete remote files that don't exist locally--exclude <pattern>- Exclude files matching pattern (can be used multiple times)
Examples:
# Push all files
aiplatform-util nv push
# Push only the outputs directory
aiplatform-util nv push --prefix outputs/
# Push excluding checkpoints
aiplatform-util nv push --exclude "*.ckpt" --exclude "checkpoints/"
# See what would be pushed
aiplatform-util nv push --dry-run
# Push and remove remote files not in local
aiplatform-util nv push --deleteDelete files from the network volume:
aiplatform-util nv rm <file1> <file2> ...Options:
--prefix <path>- Remove all files under a specific directory--recursive- Remove recursively when using --prefix (default: true)--dry-run- Preview what would be deleted
Examples:
# Remove a single file
aiplatform-util nv rm myfile.txt
# Remove multiple files
aiplatform-util nv rm file1.txt file2.txt
# Remove all files in a directory
aiplatform-util nv rm --prefix data/
# Preview what would be deleted
aiplatform-util nv rm --prefix data/ --dry-run# Pull your latest work from network volume
aiplatform-util nv pull# List files in network volume
aiplatform-util nv ls# Push all changes
aiplatform-util nv push
# Or push excluding temporary files
aiplatform-util nv push --exclude "*.tmp" --exclude ".cache/"# Push and remove remote files you deleted locally
aiplatform-util nv push --delete
# Pull and remove local files deleted remotely
aiplatform-util nv pull --delete# See what would be pushed
aiplatform-util nv push --dry-run
# See what would be pulled
aiplatform-util nv pull --dry-run
# See what would be deleted
aiplatform-util nv rm --prefix old-data/ --dry-run- Automatic multipart uploads - Files >16MB are split into chunks and uploaded in parallel
- 10 concurrent threads - Maximum network throughput for large files
- Progress tracking - Real-time progress updates for files >10MB
- Smart sync - Only uploads/downloads files that changed
- Optimized for large files - Efficient handling of GB-sized model files
If you prefer to build from source:
# Clone the repository
git clone https://github.com/vngcloud/aiplatform-util.git
cd aiplatform-util
# Build
go build -o aiplatform-util
# Install
sudo mv aiplatform-util /usr/local/bin/Requirements:
- Go 1.21 or higher
Make sure your credentials are configured correctly. Check both configuration files and environment variables:
# Check configuration files
cat /etc/config-nv/AWS_ACCESS_KEY_ID
cat /etc/config-nv/AWS_SECRET_ACCESS_KEY
cat /etc/config-nv/AWS_ENDPOINT
# Or check environment variables
echo $AWS_ACCESS_KEY_ID
echo $AWS_SECRET_ACCESS_KEY
echo $AWS_ENDPOINTSet the bucket name via configuration file or environment variable:
# Option 1: Configuration file
echo "your-bucket-name" > /etc/config-nv/S3_BUCKET
# Option 2: Environment variable
export S3_BUCKET=your-bucket-nameOr list available buckets:
aiplatform-util nv lsThe tool uses 10 parallel threads for optimal performance. Slow speeds may be due to:
- Network bandwidth limitations
- Server-side throttling
- File system performance
Works with any S3-compatible storage:
- VNG Cloud vStorage
- MinIO
- Amazon S3
- Issues: GitHub Issues
- Discussions: GitHub Discussions
MIT License - See LICENSE file for details.
Built with:
- MinIO Go SDK - Fast S3-compatible storage client
- Cobra - Modern CLI framework