{"repo":"replicate/cog","free":true,"listed":false,"github":"https://github.com/replicate/cog","clone":"git clone https://github.com/replicate/cog.git","description":"Containers for machine learning","language":"Go","stars":9459,"topics":["containers","cuda","docker","machine-learning","pytorch","tensorflow","ai"],"license":"Apache-2.0","category":"machine-learning","readme_excerpt":"Cog: Containers for machine learning Cog is an open-source tool that lets you package machine learning models in a standard, production-ready container. You can deploy your packaged model to your own infrastructure, or to Replicate. Highlights - 📦 Docker containers without the pain. Writing your own Dockerfile can be a bewildering process. With Cog, you define your environment with a simple configuration file and it generates a Docker image with all the best practices: Nvidia base images, efficient caching of dependencies, installing specific Python versions, sensible environment variable defaults, and so on. - 🤬️ No more CUDA hell. Cog knows which CUDA/cuDNN/PyTorch/Tensorflow/Python combos are compatible and will set it all up correctly for you. - ✅ Define the inputs and outputs for your model with standard Python. Then, Cog generates an OpenAPI schema and validates the inputs and outputs. - 🎁 Automatic HTTP inference server : Your model's types are used to dynamically generate a RESTful HTTP API using a high-performance Rust/Axum server. - 🚀 Ready for production. Deploy your model anywhere that Docker images run. Your own infrastructure, or Replicate. How it works Define the Docker environment your model runs in with cog.yaml : Define how your model runs with run.py : In the above we accept a path to the image as an input, and return a path to our transformed image after running it through our model. Now, you can run the model: Or, build a Docker image for deployment: ","default_branch":null,"files":null,"tree":[],"storefront":"/r/replicate","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/replicate/cog/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}