From afa4ee93ebdf893dc71fb56382b9922bea4a3f5f Mon Sep 17 00:00:00 2001 From: Jeroen Date: Wed, 27 Mar 2024 20:46:58 +0100 Subject: [PATCH] Fixed GH workflow for R scripts --- .github/workflows/checks.yaml | 4 ++-- PreFer_fake_outcome.csv | 31 +++++++++++++++++++++++++++++++ r.Dockerfile | 10 +++++----- 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 PreFer_fake_outcome.csv diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 6b57a42..f9c36cf 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -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 @@ -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 diff --git a/PreFer_fake_outcome.csv b/PreFer_fake_outcome.csv new file mode 100644 index 0000000..9ee82a7 --- /dev/null +++ b/PreFer_fake_outcome.csv @@ -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 diff --git a/r.Dockerfile b/r.Dockerfile index 7323e5a..5cbd5d7 100644 --- a/r.Dockerfile +++ b/r.Dockerfile @@ -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"] \ No newline at end of file +ENTRYPOINT ["Rscript", "run.R"] \ No newline at end of file