Skip to content

Commit

Permalink
Merge pull request #10 from ipranjal/feature/docker_assignment
Browse files Browse the repository at this point in the history
Feature/docker assignment
  • Loading branch information
ipranjal authored Nov 7, 2023
2 parents 6d48152 + fd3fc71 commit 98e047a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/action_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
run: python3 digits.py --runs 4 --test_sizes 0.2,0.3 --dev_sizes 0.2 --models svm,tree
- name: Run test cases
run: python3 -m pytest
- run: echo "This statment is added to echo as part of quiz question 1"
- name: Run docker commands
run: source ./docker/docker_run.sh




2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM python:3.9.17
COPY . /digits/
RUN pip3 install --no-cache-dir -r /digits/requirements.txt
WORKDIR /digits
CMD ["pytest"]
CMD ["python3","digits.py","--runs=1","--test_size=0.2","--dev_size=0.3","--models=svm,tree"]
7 changes: 7 additions & 0 deletions docker/docker_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Build the docker file
docker build -t digits:v1 -f ./docker/Dockerfile .
# Create out volume
docker volume create mltrain
# Mount our volume to models directory (where train data is stored)
docker run -v mltrain:/digits/models digits:v1

0 comments on commit 98e047a

Please sign in to comment.