commit 29aa989e4b9446aa2f88c4ddf8cdbc49311839c2 Author: Jian-Kai Wang Date: Thu Nov 22 21:13:29 2018 +0800 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..efc5ba0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,144 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# mac +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..68ed4e6 --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +# mlflow + + + +* Reference: + * official website: https://mlflow.org/ + * github: https://github.com/mlflow/mlflow + + + +## Usage + + + +### Build a Docker image + +```sh +git clone https://github.com/jiankaiwang/mlflow-basis.git +cd ./mlflow-basis +sudo docker build -t mlflow-basis:latest . +``` + + + +### Run a Container + +```sh +# list available docker images +sudo docker images + +# list running containers +sudo docker ps -a + +# run the container +# container port 5000: mlflow server +# --rm: remove the container while exiting +# -i: interactive +# -t: terminal mode +# -v: path for host:container +# +# example: docker run -it --rm --name mlflow -p 5000:5000 mlflow:latest +# +sudo docker run -it --rm --name mlflow -p 5000:5000 -v : mlflow-basis:latest + +# stop the container +sudo docker stop mlflow + +# restart the container +sudo docker restart mlflow + +# remove the container +sudo docker rm mlflow +``` + + + +### Interact with Container + +```sh +sudo docker exec -it mlflow /bin/bash +``` + + + +### mlflow Quickstart + +* start the training in mlflow example + +```sh +# by default +# working dir: /app/mlflow/examples +python ./quickstart/mlflow_tracking.py +``` + +* start the mlflow server to monitor the result + +```sh +# host 0.0.0.0: allow all remote access +mlflow server --file-store ./mlruns --host 0.0.0.0 +``` + + + +### Push to Dockerhub + +```sh +sudo docker login + +# set another tag +sudo docker tag mlflow-basis:latest /mlflow-basis: + +# push to the dockerhub +sudo docker push /mlflow-basis: +``` +