Powered by Docker. GPU support
- Any Linux distribution and a GPU
- Docker
- Docker-Compose
- nvidia-Docker
- From the
docker
folder run:docker-compose up -d
After building the Docker container (it can take a while), the API will start.
You can check the status of the container with: docker ps -a
You can also see what's going on inside the container with docker logs detectron-api -f
- On the main folder run:
python send_file.py
This will send demo_img.jpg
to the API using the Python requests package.
Feel free to modify the script and add it to your pipeline
import requests
# Load file
with open('demo_img.jpg', 'rb') as f:
contents = f.read()
files=dict(img1=contents)
# Send file
response = requests.post('http://localhost:5000/',
files=files)
# Save the received file
with open('response_file.png', 'wb') as f:
f.write(response.content)
Tested on Ubuntu 18.04 with a RTX 2080 Ti GPU (drivers 440.36)
- You don't have to install CUDA
- Language agnostic
- Very easy to integrate in any pipeline, only a HTTP request needed.
- The API will be isolated from your code. No dependency errors