-
Notifications
You must be signed in to change notification settings - Fork 1
/
onCreate
executable file
·35 lines (28 loc) · 1.17 KB
/
onCreate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
set -eu
# Customize git configuration for shell prompt and terminal colors.
ln -s -- "$(realpath .devcontainer/git_prompt_activate.bash)" \
~/.git_prompt_activate.bash
printf '\n%s\n' '. ~/.git_prompt_activate.bash' >>~/.bashrc
git config --global color.diff.new blue
git config --global devcontainers-theme.hide-status 1
# Set up container-wide Graphviz installation (for when running via Poetry).
.devcontainer/install-graphviz 8.0.5
# Set up Poetry and its plugins.
pipx install poetry
pipx inject poetry poetry-plugin-sort poetry-plugin-up
# Set up Mambaforge, which provides conda and mamba.
cd /tmp
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
chmod +x Mambaforge-Linux-x86_64.sh
./Mambaforge-Linux-x86_64.sh -b
rm Mambaforge-Linux-x86_64.sh
~/mambaforge/condabin/mamba init --all
~/mambaforge/condabin/conda config --set auto_activate_base false
~/mambaforge/condabin/mamba update --all --yes
cd -
# Set up project environment for conda/mamba.
~/mambaforge/condabin/mamba env create
~/mambaforge/condabin/mamba run --name EmbeddingScratchwork pip install -e .
# Set up project environment for poetry.
poetry install