A tool to dockerize machine learning projects
Project description
ML-Dockerizer
ML-Dockerizer is a Python library that allows users to effortlessly dockerize an entire machine learning (ML) project with a single command-line instruction. It automatically recognizes the path of ML model files in the project directory and generates an appropriate Dockerfile.
Installation
You can install ML-Dockerizer using pip:
pip install ml-dockerizer
Usage
To dockerize your ML project, navigate to your project's root directory and run:
ml-dockerizer /path/to/your/ml/project
By default, ML-Dockerizer will use main.py as the entry point for your Docker container. If you want to specify a different entry point, use the --entry-point option:
Features
- Automatic detection of common ML model file formats (pkl, h5, joblib, pt, pth, onnx)
- Generation of a Dockerfile tailored to your ML project
- Customizable entry point for your dockerized application
- Easy-to-use command-line interface
Requirements
- Python 3.6+
- Docker (for building and running the generated Docker image)
How it works
-
ML-Dockerizer scans your project directory for ML model files.
-
It generates a Dockerfile that:
- Uses a Python 3.8 slim base image
- Copies and installs the requirements from
requirements.txt - Copies the identified model files
- Copies the rest of the project files
- Sets the default command to run your specified entry point
-
You can then use standard Docker commands to build and run your containerized ML project.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request (git repository coming soon !).
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Thanks to all contributors who have helped shape ML-Dockerizer.
- Inspired by the need for simplified ML project containerization in the data science community.
Contact
If you have any questions, feel free to reach out to [aviroop-pal] at [avirooppal42@gmail.com].
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dockerizeasml-0.1.1.tar.gz.
File metadata
- Download URL: dockerizeasml-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cabef92667b4059d27c96330cea3714374b0d8d731f058d095ab4b2c029973f8
|
|
| MD5 |
db0c3a7076b0fe1c3b5fe0f5a88dd638
|
|
| BLAKE2b-256 |
d1451240cc14ce4fd2f453b32258d200fd95ca1e56877c4d32508a3723e57818
|
File details
Details for the file dockerizeasml-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dockerizeasml-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166beddf0ecf535f73e2b07825e69a1034d2e15fa9db015497c3fffe79ee916f
|
|
| MD5 |
dfe696cdeae1c73dba040acd30fedb68
|
|
| BLAKE2b-256 |
afdec6758cf86c619ab7b4aebb45daf0e1344e09162026502cbf85e12dc47043
|