Skip to content

Commit

Permalink
fix docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
IvoLeist committed Mar 25, 2024
1 parent 3881bf6 commit 9517de3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
11 changes: 7 additions & 4 deletions phenoRankeR/deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libjq-dev \
libssl-dev \
libxml2-dev \
#for PostgreSQL
unixodbc-dev \
odbc-postgresql && \
odbc-postgresql \
unixodbc-dev \
libsqliteodbc && \
apt-get clean

WORKDIR /opt
Expand All @@ -40,12 +40,15 @@ RUN Rscript -e "renv::init(bare=TRUE);options(renv.config.ppm.url = 'https://${P
# interesting Github issue:https://github.com/rstudio/renv/issues/1019

COPY phenoRankeR_${PhenoRankeR_VERSION}.tar.gz .
COPY config/odbc/odbcinst.ini /app/config/odbc/odbcinst.ini
COPY --chown=dockeruser:dockeruser data/ /app/data

# somhow pak gets stuck with Loading metadata database ... done
ENV RENV_CONFIG_PAK_ENABLED=FALSE
RUN Rscript -e "renv::install('/app/phenoRankeR_${PhenoRankeR_VERSION}.tar.gz')"
ARG IGNORE_CACHE_FROM_HERE=unknown
RUN echo "IGNORE_CACHE_FROM_HERE=${IGNORE_CACHE_FROM_HERE}"
COPY run_phenoRankeR.R .
COPY run_phenoRankeR.R .
COPY data/examples/example.csv inst/extdata/examples/example.csv

FROM builder as deploy
Expand Down
7 changes: 6 additions & 1 deletion phenoRankeR/deploy/config/odbc/odbcinst.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[PostgreSQL]
Description = PostgreSQL ODBC driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
FileUsage = 1
FileUsage = 1

[SQLite]
Description=SQLite ODBC Driver
Driver=/usr/lib/x86_64-linux-gnu/odbc/libsqlite3odbc.so
UsageCount=1
4 changes: 2 additions & 2 deletions phenoRankeR/deploy/run_phenoRankeR.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ default_golem_opts <- list(
PHENO_CSV_CONV_BIN = "/usr/share/pheno-ranker/utils/csv2pheno_ranker/csv2pheno-ranker",
ODBCSYSINI = "/app/config/odbc",

dbDriver = "PostgreSQL",
dbServer = "10.10.0.2",
dbDriver = "SQLite",
dbServer = ":memory:",
dbPort = 5432,
dbDatabase = "shiny",
dbUser = "shiny",
Expand Down

0 comments on commit 9517de3

Please sign in to comment.