This repository contains two things:
- A
Dockerfile
, which installs scikit-learn with miniconda, and a few pip dependencies. - A Flask
webapp
, which utilizes basic functionality ofscikit-learn
.
All Anaconda packages are supported—scikit-learn
is just being used here as an example.
☤ Advantages over Conda Buildpack:
- No slug size limit (Anaconda packages can be very large).
- Exact Miniconda environment, from Continuum Analytics.
Deploy with the Container Registry and Runtime:
$ sudo usermod -a -G docker
$ git clone https://github.com/heroku-examples/python-miniconda
$ cd python-miniconda
$ heroku create
$ heroku container:push web
($ heroku:release web) also not working for me
$ heroku container:release web
$ heroku open
When you're running out of disk: Docker provides a single command that will clean up any resources — images, containers, volumes, and networks — that are dangling (not associated with a container):
docker system prune
To additionally remove any stopped containers and all unused images (not just dangling images), add the -a flag to the command:
docker system prune -a
docker images -a | grep "pattern" | awk '{print $3}' | xargs docker rmi
All the Docker images on a system can be listed by adding -a to the docker images command. Once you're sure you want to delete them all, you can add the -q flag to pass the Image ID to docker rmi:
List:
docker images -a
Remove:
docker rmi $(docker images -a -q)
✨🍰✨