Skip to content

Commit

Permalink
Merge pull request #14 from danielnachun/pixi_update2
Browse files Browse the repository at this point in the history
fix some issues with setup script
  • Loading branch information
gaow authored Nov 13, 2024
2 parents cffb63d + 1ccca9b commit 2324ced
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion bash/pixi/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -o errexit -o xtrace

# Use sitecustomize.py so that specific Python packages can see python_libs packages
mkdir -p ${HOME}/.local/lib/python3.12/site-packages
tee ${HOME}/.local/lib/python3.12/site-packages/sitecustomize.py << EOF
import sys
sys.path[0:0] = [
Expand All @@ -13,6 +14,9 @@ EOF
# Use Rprofile.site so that only pixi-installed R can see r_libs packages
echo ".libPaths('/opt/.pixi/envs/r-base/lib/R/library')" >> ${HOME}/.Rprofile

ln -sf ${HOME}/.pixi/bin/r ${HOME}/.pixi/bin/R
ln -sf ${HOME}/.pixi/bin/rscript ${HOME}/.pixi/bin/Rscript

# Create config files for rstudio
mkdir -p ${HOME}/.config/rstudio
tee ${HOME}/.config/rstudio/database.conf << EOF
Expand All @@ -32,7 +36,7 @@ find ${HOME}/.pixi/envs/python/share/jupyter/kernels/ -maxdepth 1 -mindepth 1 -t
xargs -I % jupyter-kernelspec install --log-level=50 --user %
find ${HOME}/.pixi/envs/r-base/share/jupyter/kernels/ -maxdepth 1 -mindepth 1 -type d | \
xargs -I % jupyter-kernelspec install --log-level=50 --user %
ark --install
# ark --install

# Jupyter configurations
mkdir -p $HOME/.jupyter && \
Expand Down
6 changes: 3 additions & 3 deletions bash/pixi/pixi-mamba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export MAMBA_ROOT_PREFIX="${HOME}/micromamba"
curl -fsSL https://raw.githubusercontent.com/gaow/misc/master/bash/pixi/pixi-setup.sh | bash

# Install global packages
pixi global install <(curl -fsSL https://raw.githubusercontent.com/gaow/misc/master/bash/pixi/envs/global_packages.txt | grep -v "#" | tr '\n' ' ')
pixi global install $(curl -fsSL https://raw.githubusercontent.com/gaow/misc/master/bash/pixi/envs/global_packages.txt | grep -v "#" | tr '\n' ' ')
pixi global install r-base=4.3 --expose R=r --expose Rscript=rscript
pixi global expose remove kill
pixi global install coreutils
Expand All @@ -24,9 +24,9 @@ micromamba shell init --quiet --shell=bash ${HOME}/micromamba
echo "use_lockfiles: false" >> ${HOME}/.mambarc

echo "Installing recommended R libraries ..."
pixi global install --environment r-base <(curl -s -O https://raw.githubusercontent.com/gaow/misc/master/bash/pixi/envs/r_packages | grep -v "#" | tr '\n' ' ')
pixi global install --environment r-base $(curl -fsSL https://raw.githubusercontent.com/gaow/misc/master/bash/pixi/envs/r_packages | grep -v "#" | tr '\n' ' ')
echo "Installing recommended Python packages ..."
pixi global install --environment python <(curl -s -O https://raw.githubusercontent.com/gaow/misc/master/bash/pixi/envs/python_packages | grep -v "#" | tr '\n' ' ')
pixi global install --environment python $(curl -fsSL https://raw.githubusercontent.com/gaow/misc/master/bash/pixi/envs/python_packages | grep -v "#" | tr '\n' ' ')
pixi clean cache -y

# Install config files
Expand Down

0 comments on commit 2324ced

Please sign in to comment.