mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-30 18:56:16 +00:00
devcontainer: add LaTeX, typst, math CLI tools, and Python math packages
flake.nix (authoritative — Nix-built OCI image): - pythonEnv: add mpmath, matplotlib, seaborn, pandas, polars, scikit-learn - New rEnv binding: R via rWrapper with tidyverse, ggplot2, dplyr, tidyr, readr, purrr, stringr, forcats, lubridate, MASS, Matrix, survival, knitr, rmarkdown - devPkgs: add texliveFull, gnuplot, maxima, wxmaxima, octave, rEnv, typst - PATH env: expose texliveFull, typst, gnuplot, maxima, octave, rEnv bins Dockerfile (Alpine reference — kept in sync): - apk: add texlive-full, gnuplot, maxima, octave, R - New RUN layer: typst static binary from GitHub releases (musl build) - uv pip install: add mpmath, matplotlib, seaborn, pandas, polars, scikit-learn Note: sage is not packaged in nixpkgs 24.11; mpmath covers arbitrary-precision arithmetic needs. wxmaxima omitted from Dockerfile (requires display server; headless image). Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e2bbb611ea
commit
b52f79d1b4
2 changed files with 72 additions and 2 deletions
|
|
@ -41,8 +41,24 @@ RUN apk add --no-cache \
|
||||||
rclone \
|
rclone \
|
||||||
# ip / iproute2 needed by tailscaled
|
# ip / iproute2 needed by tailscaled
|
||||||
iproute2 \
|
iproute2 \
|
||||||
|
# ── LaTeX + typesetting ───────────────────────────────────────────────────
|
||||||
|
texlive-full \
|
||||||
|
# ── Math / science CLI ────────────────────────────────────────────────────
|
||||||
|
gnuplot \
|
||||||
|
maxima \
|
||||||
|
# wxmaxima requires a display; skip in headless image
|
||||||
|
octave \
|
||||||
|
R \
|
||||||
&& :
|
&& :
|
||||||
|
|
||||||
|
# ── Typst (static binary — not in Alpine apk) ────────────────────────────────
|
||||||
|
RUN TYPST_VER=$(curl -fsSL https://api.github.com/repos/typst/typst/releases/latest \
|
||||||
|
| grep '"tag_name"' | grep -oP 'v[\d.]+') \
|
||||||
|
&& curl -fsSL "https://github.com/typst/typst/releases/download/${TYPST_VER}/typst-x86_64-unknown-linux-musl.tar.xz" \
|
||||||
|
| tar -xJ -C /tmp/ \
|
||||||
|
&& install -m 755 /tmp/typst-x86_64-unknown-linux-musl/typst /usr/local/bin/typst \
|
||||||
|
&& rm -rf /tmp/typst-x86_64-unknown-linux-musl
|
||||||
|
|
||||||
# ── Tailscale (static binary — userspace networking, no root required) ────────
|
# ── Tailscale (static binary — userspace networking, no root required) ────────
|
||||||
RUN TSVER=$(curl -fsSL https://pkgs.tailscale.com/stable/ \
|
RUN TSVER=$(curl -fsSL https://pkgs.tailscale.com/stable/ \
|
||||||
| grep -oP 'tailscale_\K[0-9]+\.[0-9]+\.[0-9]+(?=_amd64\.tgz)' \
|
| grep -oP 'tailscale_\K[0-9]+\.[0-9]+\.[0-9]+(?=_amd64\.tgz)' \
|
||||||
|
|
@ -101,6 +117,16 @@ RUN uv pip install --python /home/researcher/venv/bin/python3 \
|
||||||
# Numerics
|
# Numerics
|
||||||
numpy \
|
numpy \
|
||||||
scipy \
|
scipy \
|
||||||
|
# Arbitrary-precision arithmetic
|
||||||
|
mpmath \
|
||||||
|
# Plotting / visualisation
|
||||||
|
matplotlib \
|
||||||
|
seaborn \
|
||||||
|
# Data frames
|
||||||
|
pandas \
|
||||||
|
polars \
|
||||||
|
# Machine learning
|
||||||
|
scikit-learn \
|
||||||
# Search / web
|
# Search / web
|
||||||
beautifulsoup4 \
|
beautifulsoup4 \
|
||||||
lxml \
|
lxml \
|
||||||
|
|
|
||||||
48
flake.nix
48
flake.nix
|
|
@ -43,6 +43,16 @@
|
||||||
numpy
|
numpy
|
||||||
scipy
|
scipy
|
||||||
sympy
|
sympy
|
||||||
|
# Arbitrary-precision arithmetic
|
||||||
|
mpmath
|
||||||
|
# Plotting / visualisation
|
||||||
|
matplotlib
|
||||||
|
seaborn
|
||||||
|
# Data frames
|
||||||
|
pandas
|
||||||
|
polars
|
||||||
|
# Machine learning
|
||||||
|
scikit-learn
|
||||||
# Web scraping
|
# Web scraping
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
lxml
|
lxml
|
||||||
|
|
@ -55,7 +65,28 @@
|
||||||
urllib3
|
urllib3
|
||||||
]);
|
]);
|
||||||
|
|
||||||
# ── Dev shell packages ──────────────────────────────────────────────────
|
# ── R environment with tidyverse + ggplot2 ─────────────────────────────
|
||||||
|
rEnv = pkgs.rWrapper.override {
|
||||||
|
packages = with pkgs.rPackages; [
|
||||||
|
tidyverse
|
||||||
|
ggplot2
|
||||||
|
dplyr
|
||||||
|
tidyr
|
||||||
|
readr
|
||||||
|
purrr
|
||||||
|
stringr
|
||||||
|
forcats
|
||||||
|
lubridate
|
||||||
|
# Statistical extras
|
||||||
|
MASS
|
||||||
|
Matrix
|
||||||
|
survival
|
||||||
|
# Output
|
||||||
|
knitr
|
||||||
|
rmarkdown
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
devPkgs = with pkgs; [
|
devPkgs = with pkgs; [
|
||||||
# Version control
|
# Version control
|
||||||
git
|
git
|
||||||
|
|
@ -117,6 +148,19 @@
|
||||||
# pkg-config for Rust native dependency discovery (openssl-sys, etc.)
|
# pkg-config for Rust native dependency discovery (openssl-sys, etc.)
|
||||||
pkg-config
|
pkg-config
|
||||||
openssl
|
openssl
|
||||||
|
# ── LaTeX ──────────────────────────────────────────────────────────────
|
||||||
|
# texliveFull: complete TeX Live distribution (~5 GB) — every package
|
||||||
|
# pre-cached in the image so latex/xelatex/lualatex/latexmk all work
|
||||||
|
# offline. Use texliveMedium to trade completeness for image size.
|
||||||
|
texliveFull
|
||||||
|
# ── Math / science CLI ─────────────────────────────────────────────────
|
||||||
|
gnuplot # publication-quality 2-D/3-D scientific plotting
|
||||||
|
maxima # full CAS: symbolic algebra, calculus, ODEs
|
||||||
|
wxmaxima # GUI front-end for maxima
|
||||||
|
octave # GNU Octave — MATLAB-compatible numerics
|
||||||
|
rEnv # R + tidyverse / ggplot2 (see rEnv binding above)
|
||||||
|
# ── Typesetting ────────────────────────────────────────────────────────
|
||||||
|
typst # modern markup-based typesetting (LaTeX alternative)
|
||||||
];
|
];
|
||||||
|
|
||||||
# ── customEtc provides standard etc configuration with researcher user ──
|
# ── customEtc provides standard etc configuration with researcher user ──
|
||||||
|
|
@ -166,7 +210,7 @@
|
||||||
User = "1000";
|
User = "1000";
|
||||||
WorkingDir = "/home/researcher/stack";
|
WorkingDir = "/home/researcher/stack";
|
||||||
Env = [
|
Env = [
|
||||||
"PATH=/home/researcher/.elan/bin:${pythonEnv}/bin:${pkgs.uv}/bin:${pkgs.git}/bin:${pkgs.ripgrep}/bin:${pkgs.jq}/bin:${pkgs.coreutils}/bin:${pkgs.bashInteractive}/bin:${pkgs.binutils}/bin:${pkgs.glibc.bin}/bin:${pkgs.gzip}/bin:${pkgs.pkg-config}/bin:${pkgs.openssl.bin}/bin:/usr/bin:/bin"
|
"PATH=/home/researcher/.elan/bin:${pythonEnv}/bin:${pkgs.uv}/bin:${pkgs.git}/bin:${pkgs.ripgrep}/bin:${pkgs.jq}/bin:${pkgs.coreutils}/bin:${pkgs.bashInteractive}/bin:${pkgs.binutils}/bin:${pkgs.glibc.bin}/bin:${pkgs.gzip}/bin:${pkgs.pkg-config}/bin:${pkgs.openssl.bin}/bin:${pkgs.texliveFull}/bin:${pkgs.typst}/bin:${pkgs.gnuplot}/bin:${pkgs.maxima}/bin:${pkgs.octave}/bin:${rEnv}/bin:/usr/bin:/bin"
|
||||||
"LD_LIBRARY_PATH=${pkgs.gcc.cc.lib}/lib:${pkgs.glibc}/lib:${pkgs.libglvnd}/lib:${pkgs.xorg.libX11}/lib:${pkgs.xorg.libXext}/lib:${pkgs.xorg.libXrender}/lib:${pkgs.mesa}/lib:${pkgs.openssl}/lib"
|
"LD_LIBRARY_PATH=${pkgs.gcc.cc.lib}/lib:${pkgs.glibc}/lib:${pkgs.libglvnd}/lib:${pkgs.xorg.libX11}/lib:${pkgs.xorg.libXext}/lib:${pkgs.xorg.libXrender}/lib:${pkgs.mesa}/lib:${pkgs.openssl}/lib"
|
||||||
"PYTHONUNBUFFERED=1"
|
"PYTHONUNBUFFERED=1"
|
||||||
"XDG_CACHE_HOME=/home/researcher/.cache"
|
"XDG_CACHE_HOME=/home/researcher/.cache"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue