Skip to content

Commit

Permalink
can't preconfigure aws endpoint in python & r
Browse files Browse the repository at this point in the history
  • Loading branch information
avouacr committed Jan 6, 2024
1 parent 1c070bf commit d9d81a9
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion python-minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN wget -q "https://github.com/conda-forge/miniforge/releases/latest/download/M
# Install essential Python packages
mamba env update -n base -f conda-env.yml && \
# Install duckdb extensions
mamba run -n base python opt/install-duckdb-extensions.py && \
mamba run -n base python /opt/install-duckdb-extensions.py && \
# Activate custom Conda env by default in shell
echo ". ${MAMBA_DIR}/etc/profile.d/conda.sh && conda activate" >> ${HOME}/.bashrc && \
# Fix permissions
Expand Down
2 changes: 1 addition & 1 deletion r-minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN /rocker_scripts/setup_R.sh && \
targets \
vaultr && \
# Install duckdb extensions
Rscript opt/install-duckdb-extensions.R && \
Rscript /opt/install-duckdb-extensions.R && \
# Fix permissions
chown -R ${USERNAME}:${GROUPNAME} ${HOME} ${R_HOME} && \
# Clean
Expand Down
3 changes: 0 additions & 3 deletions scripts/configure-duckdb.R

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/configure-duckdb.py

This file was deleted.

1 change: 1 addition & 0 deletions scripts/install-duckdb-extensions.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ con <- DBI::dbConnect(duckdb::duckdb())
DBI::dbExecute(con, glue::glue('SET extension_directory=\"{Sys.getenv("HOME")}\"'))
DBI::dbExecute(con, 'INSTALL httpfs')
DBI::dbExecute(con, 'INSTALL aws')
DBI::dbDisconnect(con, shutdown=TRUE)
10 changes: 0 additions & 10 deletions scripts/onyxia-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,6 @@ SET s3_endpoint='$AWS_S3_ENDPOINT';
EOF
fi
# Configure duckdb Python API
if [[ -n $AWS_S3_ENDPOINT ]] && command -v python ; then
mamba run -n base python opt/configure-dubkdb.py
fi
# Configure duckdb R API
if [[ -n $AWS_S3_ENDPOINT ]] && command -v R ; then
Rscript opt/configure-duckdb.R
fi
if [[ -e "$HOME/work" ]]; then
if [[ $(id -u) = 0 ]]; then
echo "cd $HOME/work" >> /etc/profile
Expand Down

0 comments on commit d9d81a9

Please sign in to comment.