- Mise En Place
- Set Up Equipment
- Get Ingredients
- Create a Shopping List
- Create Recipe Directions
- Make Dish
- Taste Test
- Serve to Other Chefs
- DockerHub Account https://hub.docker.com/signup
- Docker installed
- GitHub Account https://github.com/join?source=header-home
- Fork repo https://github.com/bryan-nice/creating-recipes-for-other-chefs.git
- Create DockerHub Repo and Link forked GitHub Repo to it
Clone repo forked repo
git clone https://github.com/bryan-nice/creating-recipes-for-other-chefs.git
- Open the file nedocsRandomForestForecast.R
- At the top of the file add
#!/usr/bin/env Rscript
. This will enable the bash interpreter to use the correct kernel so it can be executed like an app. - Look for the line where the variable
packages
exists and take note of the packages required for this model to function. - Let's inspect the R file to understand how data is following in and out of the model process.
- Open
Dockerfile
and add the list of required pacakages to the line withENV R_PACKAGE
. (Should look likeENV R_PACKAGE "'a','b','c'"
) - Let's inspect the
Dockerfile
to understand the instructions. - Save and close
Dockerfile
Execute docker build command to create the image locally.
docker build --tag nedocs .
Test the container with the example data set to verify everything works correctly.
docker run --rm -it -v ${PWD}/examples:/examples nedocs \
--r-script /r-files/nedocsRandomForestForecast.R \
--input-data-file /examples/nedocs_dataset.csv \
--output-data-file /examples/nedocs_output.csv
Commit and push completed recipe to GitHub repo.
git add
git commit -m “finish my first recipe for a chef”
git push
After check the GitHub repo to verify the Dockerfile
exists. Finally, check DockerHub to make sure the build process was triggered.