File: workspace_config

package info (click to toggle)
numpy 1%3A1.24.2-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 44,720 kB
  • sloc: ansic: 188,931; python: 156,261; asm: 111,405; javascript: 32,693; cpp: 14,210; f90: 755; sh: 638; fortran: 478; makefile: 292; sed: 140; perl: 34
file content (58 lines) | stat: -rw-r--r-- 2,235 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Basic configurations for the workspace

set -e

# gitpod/workspace-base needs at least one file here
touch /home/gitpod/.bashrc.d/empty

# Add git aliases
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.hist "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"
git config --global alias.type 'cat-file -t'
git config --global alias.dump 'cat-file -p'

# Enable basic vim defaults in ~/.vimrc
echo "filetype plugin indent on" >>~/.vimrc
echo "set colorcolumn=80" >>~/.vimrc
echo "set number" >>~/.vimrc
echo "syntax enable" >>~/.vimrc

# Vanity custom bash prompt - makes it more legible
echo "PS1='\[\e]0;\u \w\a\]\[\033[01;36m\]\u\[\033[m\] > \[\033[38;5;141m\]\w\[\033[m\] \\$ '" >>~/.bashrc

# Enable prompt color in the skeleton .bashrc
# hadolint ignore=SC2016
sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc

# .gitpod.yml is configured to install NumPy from /workspace/numpy
echo "export PYTHONPATH=${WORKSPACE}" >>~/.bashrc

# make conda activate command available from /bin/bash (login and interactive)
if [[ ! -f "/etc/profile.d/conda.sh" ]]; then
    ln -s ${CONDA_DIR}/etc/profile.d/conda.sh /etc/profile.d/conda.sh
fi
echo ". ${CONDA_DIR}/etc/profile.d/conda.sh" >>~/.bashrc
echo "conda activate numpy-dev" >>~/.bashrc

# Enable prompt color in the skeleton .bashrc
# hadolint ignore=SC2016
sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc

# .gitpod.yml is configured to install numpy from /workspace/numpy
echo "export PYTHONPATH=/workspace/numpy" >>~/.bashrc

# Set up ccache for compilers for this Dockerfile
# REF: https://github.com/conda-forge/compilers-feedstock/issues/31
echo "conda activate numpy-dev" >>~/.startuprc
echo "export CC=\"ccache \$CC\"" >>~/.startuprc
echo "export CXX=\"ccache \$CXX\"" >>~/.startuprc
echo "export F77=\"ccache \$F77\"" >>~/.startuprc
echo "export F90=\"ccache \$F90\"" >>~/.startuprc
echo "export GFORTRAN=\"ccache \$GFORTRAN\"" >>~/.startuprc
echo "export FC=\"ccache \$FC\"" >>~/.startuprc
echo "source ~/.startuprc" >>~/.profile
echo "source ~/.startuprc" >>~/.bashrc