Skip to content

Commit 150c4a7

Browse files
committed
Add build artifacts
To construct a dockerimage and a helper to run the code as a Pachyderm Pipeline
1 parent a52582a commit 150c4a7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

scoring/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM python:3-onbuild
2+

scoring/score.bash

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -exuo pipefail
4+
5+
export input_repo=$(ls /pfs -1 | grep -v out | grep -v labels)
6+
7+
export groundtruth=$(ls /pfs/validate_labels -1)
8+
groundtruth="/pfs/validate_labels/$groundtruth"
9+
10+
export userID=`echo $input_repo | cut -f 1 -d "_"`
11+
echo "Scoring userID=$userID"
12+
13+
timestamp=`date +%F:%T`
14+
mkdir -p /pfs/out/$timestamp
15+
16+
# Note ... score.py needs the trailing slash on the input path
17+
python score.py /pfs/$input_repo/ $groundtruth --output /pfs/out/$timestamp
18+

0 commit comments

Comments
 (0)