This project implements a real-time speech-to-speech translation system using Meta's SeamlessM4T model, deployed in Docker on a GCP Compute Engine VM.
Clone/Upload the project to your VM:
# If using git
git clone <your-repo-url>
cd seamless-poc
# Or upload the files directly to your VM
Set up native environment:
chmod +x scripts/setup-native.sh
./scripts/setup-native.sh
Run the service:
chmod +x scripts/run-native.sh
./scripts/run-native.sh
Development mode (auto-restart on changes):
chmod +x scripts/dev-mode.sh
./scripts/dev-mode.sh
Test GPU setup:
chmod +x scripts/test-gpu.sh
./scripts/test-gpu.sh
Build and run:
chmod +x scripts/build-and-run.sh
./scripts/build-and-run.sh
http://YOUR_VM_EXTERNAL_IP:7860
seamless-poc/
βββ backend/
β βββ main.py # FastAPI WebSocket server
βββ frontend/
β βββ index.html # Web client interface
βββ scripts/
β βββ build-and-run.sh # Linux deployment script
β βββ build-and-run.bat # Windows deployment script
β βββ stop.sh # Cleanup script
βββ Dockerfile # Container configuration
βββ requirements.txt # Python dependencies
βββ README.md # This file
facebook/seamless-m4t-large# View logs
docker logs -f seamless-translator-app
# Stop service
docker stop seamless-translator-app
# Start service
docker start seamless-translator-app
# Remove container
docker rm seamless-translator-app
# Full cleanup
./scripts/stop.sh
# Make volume script executable
chmod +x scripts/manage-volume.sh
# Create model cache volume
./scripts/manage-volume.sh create
# Inspect volume contents
./scripts/manage-volume.sh inspect
# Backup model cache
./scripts/manage-volume.sh backup
# Restore from backup
./scripts/manage-volume.sh restore backup-file.tar
# Check volume size
./scripts/manage-volume.sh size
# Clean volume (removes cached models)
./scripts/manage-volume.sh clean
# Test model availability before building
python3 test_model.py
# Check transformers version
python3 -c "import transformers; print(transformers.__version__)"
# Verify model exists on Hugging Face
curl -I https://huggingface.co/facebook/seamless-m4t-large
# Check CUDA compatibility and GPU access
nvidia-smi
docker run --rm --gpus all nvidia/cuda:12.1-base-ubuntu22.04 nvidia-smi
# Check container logs
docker logs seamless-translator-app
# Verify port is available
netstat -tlnp | grep :7860
# Test model loading in container
docker run --rm --gpus all seamless-translator python3 test_model.py
engben# Rebuild with latest changes (preserves model cache)
docker stop seamless-translator-app
docker rm seamless-translator-app
./scripts/build-and-run.sh
# Force model re-download (if needed)
./scripts/manage-volume.sh clean
./scripts/build-and-run.sh
# Backup before major changes
./scripts/manage-volume.sh backup
For issues or questions:
docker logs -f seamless-translator-appnvidia-smicurl http://localhost:7860/health25 commits
Python
34.3%
HTML
31.8%
Shell
30.7%
Batchfile
1.8%
Dockerfile
1.5%
This project implements a real-time speech-to-speech translation system using Meta's SeamlessM4T model, deployed in Docker on a GCP Compute Engine VM.
Clone/Upload the project to your VM:
# If using git
git clone <your-repo-url>
cd seamless-poc
# Or upload the files directly to your VM
Set up native environment:
chmod +x scripts/setup-native.sh
./scripts/setup-native.sh
Run the service:
chmod +x scripts/run-native.sh
./scripts/run-native.sh
Development mode (auto-restart on changes):
chmod +x scripts/dev-mode.sh
./scripts/dev-mode.sh
Test GPU setup:
chmod +x scripts/test-gpu.sh
./scripts/test-gpu.sh
Build and run:
chmod +x scripts/build-and-run.sh
./scripts/build-and-run.sh
http://YOUR_VM_EXTERNAL_IP:7860
seamless-poc/
βββ backend/
β βββ main.py # FastAPI WebSocket server
βββ frontend/
β βββ index.html # Web client interface
βββ scripts/
β βββ build-and-run.sh # Linux deployment script
β βββ build-and-run.bat # Windows deployment script
β βββ stop.sh # Cleanup script
βββ Dockerfile # Container configuration
βββ requirements.txt # Python dependencies
βββ README.md # This file
facebook/seamless-m4t-large# View logs
docker logs -f seamless-translator-app
# Stop service
docker stop seamless-translator-app
# Start service
docker start seamless-translator-app
# Remove container
docker rm seamless-translator-app
# Full cleanup
./scripts/stop.sh
# Make volume script executable
chmod +x scripts/manage-volume.sh
# Create model cache volume
./scripts/manage-volume.sh create
# Inspect volume contents
./scripts/manage-volume.sh inspect
# Backup model cache
./scripts/manage-volume.sh backup
# Restore from backup
./scripts/manage-volume.sh restore backup-file.tar
# Check volume size
./scripts/manage-volume.sh size
# Clean volume (removes cached models)
./scripts/manage-volume.sh clean
# Test model availability before building
python3 test_model.py
# Check transformers version
python3 -c "import transformers; print(transformers.__version__)"
# Verify model exists on Hugging Face
curl -I https://huggingface.co/facebook/seamless-m4t-large
# Check CUDA compatibility and GPU access
nvidia-smi
docker run --rm --gpus all nvidia/cuda:12.1-base-ubuntu22.04 nvidia-smi
# Check container logs
docker logs seamless-translator-app
# Verify port is available
netstat -tlnp | grep :7860
# Test model loading in container
docker run --rm --gpus all seamless-translator python3 test_model.py
engben# Rebuild with latest changes (preserves model cache)
docker stop seamless-translator-app
docker rm seamless-translator-app
./scripts/build-and-run.sh
# Force model re-download (if needed)
./scripts/manage-volume.sh clean
./scripts/build-and-run.sh
# Backup before major changes
./scripts/manage-volume.sh backup
For issues or questions:
docker logs -f seamless-translator-appnvidia-smicurl http://localhost:7860/health25 commits
Python
34.3%
HTML
31.8%
Shell
30.7%
Batchfile
1.8%
Dockerfile
1.5%