Make sure you have installed minikube, kubectl, Terraform, and docker.
minikube start
Note that if you want to run your local images, you need to have installed dvc and poetry, then execute the following commands.
eval $(minikube docker-env)
conda create -n [env name] python=3.9
conda activate [env name]
conda install poetry
poetry env use 3.9 # This returns a new poetry environment with python 3.9
source /path/to/created/poetry/environment/activate # Switch to the poetry environment (you should also set this environment as the python interpreter in your IDE)
poetry install
dvc repro
minikube dashboard
cd terraform
terraform init
terraform apply -var="use_local_containers=true"
minikube tunnel
To lint the python code, you should run the linter.sh script.
This requires you to have installed the requirements.txt file.
You can test out the github actions locally using the act tool.
- Install the
acttool: https://github.com/nektos/act - Create a Personal Access Token: https://github.com/settings/tokens/new and make sure it has the
repo,read:user,read:emailandwrite:discussionsscopes. - Save this token in a
act.secretsfile as:GITHUB_TOKEN=<your token>. - Then you can test out actions using act, see their page for more instructions.
You have to include the secrets file using
act --secret-file act.secrets <any other options or commands>
By default, any push to the main branch will trigger a release. This release is by default bumping only the minor version. If you want to manually bump the version, please see https://github.com/anothrNick/github-tag-action#bumping
- Template code from: https://github.com/mengdong/python-ml-structure
Get started:
python3 ./src/run.py --preprocesspython3 ./src/run.py --trainpython3 ./src/run.py --serve
Build and run the HTTP server container:
docker build -t nidhogg-http-server http_serverdocker run -it -p 8080:8080 nidhogg-http-server