Skip to content

Conversation

@ggmarts04
Copy link

This commit introduces changes to allow the model to be deployed on RunPod Serverless.

Key changes include:

  • runpod_handler.py: A new handler script that serves as the entry point for RunPod. It processes video and audio URL inputs, downloads the files, and then uses the existing Predictor class to perform inference.
  • Dockerfile: A new Dockerfile to build the container image for RunPod. It includes system dependencies (ffmpeg, libgl1), Python packages from requirements.txt, the downloader, and sets the appropriate CMD for the RunPod Python environment.
  • requirements.txt: Added the runpod package, which is necessary for the RunPod serverless environment.
  • RUNPOD_DEPLOYMENT.md: New documentation detailing how to build the Docker image, deploy it to RunPod, and make requests to the serverless endpoint.

The existing core inference logic in predict.py and scripts/inference.py remains largely unchanged, with the new handler acting as an adapter for the RunPod environment and URL-based inputs.

This commit introduces changes to allow the model to be deployed on RunPod Serverless.

Key changes include:

- **`runpod_handler.py`**: A new handler script that serves as the entry point for RunPod. It processes video and audio URL inputs, downloads the files, and then uses the existing `Predictor` class to perform inference.
- **`Dockerfile`**: A new Dockerfile to build the container image for RunPod. It includes system dependencies (ffmpeg, libgl1), Python packages from `requirements.txt`, the downloader, and sets the appropriate CMD for the RunPod Python environment.
- **`requirements.txt`**: Added the `runpod` package, which is necessary for the RunPod serverless environment.
- **`RUNPOD_DEPLOYMENT.md`**: New documentation detailing how to build the Docker image, deploy it to RunPod, and make requests to the serverless endpoint.

The existing core inference logic in `predict.py` and `scripts/inference.py` remains largely unchanged, with the new handler acting as an adapter for the RunPod environment and URL-based inputs.
@ggmarts04
Copy link
Author

update

The previous Dockerfile was missing `curl`, which is required for downloading
the `pget` tool during the image build process. This resulted in a
"curl: not found" error.

This commit adds `curl` to the `apt-get install` command in the Dockerfile
to ensure it is available.
The Docker build was failing during `pip install` because the `insightface`
package could not be built from source. This typically occurs when
system-level build tools and development libraries are missing.

This commit updates the Dockerfile to install `build-essential`,
`python3-dev`, and `cmake` via `apt-get`. These packages provide
the necessary C/C++ compilers, Python development headers, and build
system tools required for compiling `insightface` and other similar
Python packages with native extensions.
@Joir-Jio
Copy link

I ran a test and found that runpod/serverless is giving an error: 'worker exited with exit code 0'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants