45 lines
2.3 KiB
Bash
45 lines
2.3 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# ─── System packages ──────────────────────────────────────────────────────────
|
|
apt-get update -qq
|
|
apt-get install -y --no-install-recommends \
|
|
curl wget git vim nano htop procps jq less unzip zip \
|
|
build-essential ca-certificates
|
|
|
|
# ─── Miniconda ────────────────────────────────────────────────────────────────
|
|
curl -fsSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh
|
|
bash /tmp/miniconda.sh -b -p /opt/miniconda3
|
|
rm /tmp/miniconda.sh
|
|
export PATH="/opt/miniconda3/bin:$PATH"
|
|
conda init bash
|
|
|
|
# ─── Python dependencies ──────────────────────────────────────────────────────
|
|
pip install -q -r /app/requirements.txt
|
|
|
|
# ─── Node.js via nvm ──────────────────────────────────────────────────────────
|
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
|
|
|
nvm install 24
|
|
|
|
# ─── Java via SDKMAN ──────────────────────────────────────────────────────────
|
|
curl -s "https://get.sdkman.io" | bash
|
|
|
|
export SDKMAN_DIR="$HOME/.sdkman"
|
|
[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ] && \. "$SDKMAN_DIR/bin/sdkman-init.sh"
|
|
|
|
sdk install java
|
|
|
|
# ─── Custom setup (add your own steps below) ──────────────────────────────────
|
|
# Example:
|
|
# conda install -y pandas numpy
|
|
# sdk install gradle
|
|
# npm install -g typescript
|
|
|
|
# ─── Start server ─────────────────────────────────────────────────────────────
|
|
exec python -u /app/main.py
|