Galactus is a Flask-based microservice designed to expose the Jarvis 3D mesh generator model.
The service is hosted on a personal machine and is accessible via pixelz.duckdns.org:1337
.
- Pylint Integration: Ensures code quality and conformity with coding standards.
- Access Control: API key-based authorization for secure access.
- Various Routes: Supports generating 3D meshes in GLB and OBJ formats.
- Health Check Routes: To ensure the API is running smoothly.
- Docker Support: Easy setup and deployment using Docker and
docker-compose
.
GET /
: Home route that serves as a verification that the API is working. No API key required.
Reach out to Gino Rey to obtain an API key. The API key must be included in the request headers.
POST /generate_glb
: Generate a GLB 3D mesh. Requires a JSON object in the format{"prompt": "a car"}
.POST /generate_obj
: Generate an OBJ 3D mesh. Requires a JSON object in the format{"prompt": "a car"}
.POST /ping
: Verifies the API's latency.GET /health_check
: Verifies that the API is operational.
We are using port forwarding to expose our local network service to the internet.
Requests to pixelz.duckdns.org:1337
are directed to our local machine via port forwarding.
- Local Network Setup: Our local network is configured to forward incoming traffic on port 1337 to the machine where the Galactus service is hosted.
- NGINX Container: On this machine, we have an NGINX container running that listens on port 1337.
- Routing: NGINX is configured as a reverse proxy to route the incoming requests to the Galactus container.
This setup allows us to securely manage and route incoming internet traffic to our local service, making it accessible from the outside world.
If you plan on hosting this API locally, you will need:
- A GPU powerful enough to run the 3D mesh generator model.
- NVIDIA Toolkit installed on your system.
- CUDA installed for GPU support.
If you are hosting the API locally, you will also need to update the NGINX configuration files to match your specific requirements. Please consult the nginx.conf
file in the nginx
folder for more information.
- Docker. Please, note that
docker-compose
is needed too and is included in the Docker Desktop installation. Docker Desktop is available for Mac, Windows and Linux.
Note that you do not necessarily need to install Docker Desktop. You can also
install Docker Engine and
docker-compose. In that case,
please use docker-compose
instead of docker compose
in all commands below.
Install all requirements, then run the app entry point.
$ pip install -e .
$ python3 startup.py
Run the premade docker-compose script.
$ ./deploy.sh