Start our project on your local machine!
ATTENTION: Since we did lots of operations on the GCP(for example, downloading the pre-trained model from cloud storage), you also need to create your own GCP account and replace the project id, bucket name etc.
1. Download the overall project files
-
Create your directory in your local machine.
-
Folk our repository / Create the git file and clone our repository
2. Create venv
- Create the virtual environment
3. Download the dataset
-
You should enter the
MLOps
directory. -
Run the below command in your terminal.
4. Run the code in docker
-
You should enter the
MLOps
directory. -
Run the below command in your terminal, and you will build the docker image based on my dockerfile.
```bash docker build -t train_image -f dockerfiles/train.dockerfile .
-
Check your built docker image.
You will get below result and we can run the train_image now.REPOSITORY TAG IMAGE ID CREATED SIZE train_image latest 311535037766 8 minutes ago 6.24GB -
As we didn't COPY the data into our docker image, we dynamically mount the Host's
data
Directory to the Container's/data
. -
Deploy the API
You can access your API at http://localhost:8080