Skip to content

Commit

Permalink
Merge pull request #34 from eyra/r-gh-action-fix
Browse files Browse the repository at this point in the history
Fixed GH workflow for R scripts
  • Loading branch information
vloothuis authored Mar 27, 2024
2 parents 18e846c + afa4ee9 commit 7b10093
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
load: true

- name: Run prediction
run: docker run --rm -v "$(pwd)/.:/data" eyra-rank:latest /data/PreFer_fake_data.csv /data/PreFer_fake_background_data.csv --out=/data/predictions.csv
run: docker run --rm -v "$(pwd)/.:/data" eyra-rank:latest /data/PreFer_fake_data.csv /data/PreFer_fake_background_data.csv --output /data/predictions.csv

- name: Build Docker scoring image
uses: docker/build-push-action@v4
Expand All @@ -50,4 +50,4 @@ jobs:
load: true

- name: Run scoring
run: docker run --rm -v "$(pwd):/data" --entrypoint conda eyra-rank:scoring run -n eyra-rank python /app/score.py /data/predictions.csv /data/PreFer_fake_data.csv
run: docker run --rm -v "$(pwd):/data" --entrypoint conda eyra-rank:scoring run -n eyra-rank python /app/score.py /data/predictions.csv /data/PreFer_fake_outcome.csv
31 changes: 31 additions & 0 deletions PreFer_fake_outcome.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
nomem_encr,new_child
700001,1
700002,0
700003,0
700004,0
700005,0
700006,0
700007,0
700008,0
700009,0
700010,1
700011,0
700012,0
700013,0
700014,0
700015,1
700016,0
700017,0
700018,1
700019,0
700020,1
700021,1
700022,0
700023,1
700024,0
700025,0
700026,0
700027,0
700028,0
700029,0
700030,0
10 changes: 5 additions & 5 deletions r.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM r-base:4.3.3

RUN mkdir /app
WORKDIR /app

COPY data /data
COPY *.R /
COPY *.rds /
COPY *.R /app
COPY *.rds /app

RUN Rscript packages.R

ENTRYPOINT ["Rscript", "run.R"]
CMD ["predict", "/data/fake_data.csv"]
ENTRYPOINT ["Rscript", "run.R"]

0 comments on commit 7b10093

Please sign in to comment.