graviraja / MLOps-Basics

MIT License
6.08k stars 1.02k forks source link

Advice how to deploy and run my docker image on my own local machine #17

Closed hihunjin closed 3 years ago

hihunjin commented 3 years ago

I have my own local machine and I'd like to substitute what AWS S3 bucket does into my machine.

From my thought, the followings are the steps

  1. Open VPN of my local network
  2. Open sft/ssh of my local machine
  3. On Github Action, put the vpn and ssh key
  4. Send my own command.

Would you give me any advice/article to read?

graviraja commented 3 years ago

Here S3 is for remote storage of the trained models. It can be substituted with any of the remote storage. DVC supports the following ones: Remote storages. Based on your requirement you can change the dockerfile. Once it is done, the Github Action should contain necessary credentials to fetch the model from remote location.

hihunjin commented 3 years ago

Oh sorry for the misunderstanding.

In this Deployment section, you said, I can use on-prem. Is there any guidance for this?

graviraja commented 3 years ago

If I understand correctly, you want to store the models in your machine instead of S3 and want github actions to read the model from the machine. If your local machine is hosted somewhere means, you can use the SSH remote config in DVC. And in github actions you can do the same by configuring the credentials. If the local machine is a personal system that is not hosted anywhere means you can use the local remote config in DVC. For this, I am quite sure about configuring Github Action.

hihunjin commented 3 years ago

Mhm That is not what I want to do.

I want to use my own cpu, ram machines (let's say on-prems) when model is running. Storage is also in my machine.

graviraja commented 3 years ago

You can use local remote for that in dvc. Configuring github action would be challenging task to do. Since it needs to access your machine to download the model and create the docker image. You can try a different hook instead of on: [push] hook. There are pre-commit hooks that will run before pushing to github. That will create the Docker image directly from the local model.

hihunjin commented 3 years ago

I see. Thanks a lot.

Then how can I configure my github action to give a permission to access my machine? is it possible? If there's any reference, please share it.

graviraja commented 3 years ago

That you need to explore. I haven't worked on it. Either try working on it (or) you can create the docker image yourself or using some script (makefile) and then continue with other steps.