- A running RunPod instance with GPU support
- Access to the Web Terminal or SSH
-
Access your RunPod instance
- Go to your RunPod dashboard
- Find your pod and click on "Connect"
- In the Connection Options dialog, click "Start" under Web Terminal
- This will open a terminal in your browser
-
Clone the repository
- In the Web Terminal, run:
cd /workspace git clone https://github.com/yourusername/marker.git cd marker
- Alternatively, you can upload your local files using the RunPod file browser
-
Build the Docker image
- In the Web Terminal, run:
docker build -t marker-gpu-api -f Dockerfile.gpu . -
Run the container with GPU support
- In the Web Terminal, run:
docker run -d --gpus all -p 8080:8080 \ -e PORT=8080 \ marker-gpu-api
-
Expose the API endpoint
- Go back to the RunPod dashboard
- Click on "Connect" for your pod
- In the Connection Options dialog, under "HTTP Services"
- Click "Add HTTP Service"
- Enter:
- Internal Port: 8080
- Service Name: Marker API
- Click "Add"
-
Access the API
- Once the service is added, you'll see a URL in the HTTP Services section
- Click on the URL to access your Marker API
If you encounter any issues:
-
Check container logs
docker ps # Get the container ID docker logs <container_id>
-
Check GPU availability
nvidia-smi
-
Verify port mapping
docker ps
Ensure the container is properly mapping port 8080