This repo contains a very simple Docker container to easily run MLflow.
- To specify a Dockerfile
docker build -f ./mlflow.dockerfile -t mlflow .
To run
docker run -p 5000:5000 mlflow
To stop immediately
docker stop <containerId>
or after an allocated time, let's say 60s
docker stop -t 60 <containerId>
- Check running containers
docker ps
- Filter for container id given image name
docker ps -q --filter ancestor=mlflow
- Chaining filtering and stopping
docker stop $(docker ps -q --filter ancestor=mlflow)
- To check for docker images
docker images
- To remove tag
docker rmi <REPOSITORY>:<TAG>
- To remove image
docker rmi <IMAGE ID>
- Check ECR repositories
aws ecr describe-repositories --region ap-northeast-1
- Login to AWS ECR
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin $HOSTNAME
If you see Login Succeeded, you're good to go.
- Tag the image that will be pushed to ECR
docker tag <IMAGE ID> $HOSTNAME/$REPOSITORY_NAME:mlflow
- Push the tagged docker image to ECR
Note: Please don't forget the repository name.
docker push $HOSTNAME/$REPOSITORY_NAME:mlflow