mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
- .devcontainer/Dockerfile: add PostgreSQL client libs, OpenSSL/libffi headers, gfortran/BLAS for scipy, rclone; install full Python dependency set (boto3, psycopg2-binary, fastapi, uvicorn, notion-client, httpx, pytest, numpy, scipy, etc.) in uv-managed venv; add rclone S3 gateway init script as ENTRYPOINT - .devcontainer/devcontainer.json: switch from build to pre-built image (localhost/research
113 lines
3.8 KiB
Docker
113 lines
3.8 KiB
Docker
FROM alpine:3.19
|
|
|
|
# ── System packages ───────────────────────────────────────────────────────────
|
|
# Core build + dev tools
|
|
RUN apk add --no-cache \
|
|
bash \
|
|
build-base \
|
|
git \
|
|
curl \
|
|
wget \
|
|
openssh-client \
|
|
rsync \
|
|
zstd \
|
|
jq \
|
|
ripgrep \
|
|
# Graphviz for visualisation helpers
|
|
graphviz \
|
|
# Node / npm for JS tooling
|
|
nodejs \
|
|
npm \
|
|
# Python runtime + package managers
|
|
python3 \
|
|
py3-pip \
|
|
pipx \
|
|
# PostgreSQL client libs (needed by psycopg2 --no-binary build)
|
|
postgresql16-client \
|
|
postgresql16-dev \
|
|
libpq-dev \
|
|
# SSL / crypto headers (boto3, requests, psycopg2)
|
|
openssl-dev \
|
|
# CFFI / ffi headers
|
|
libffi-dev \
|
|
# Needed for some science packages (scipy, etc.)
|
|
gfortran \
|
|
openblas-dev \
|
|
lapack-dev \
|
|
# Misc compression
|
|
xz \
|
|
bzip2-dev \
|
|
# rclone (Google Drive / S3 / etc.)
|
|
rclone \
|
|
&& :
|
|
|
|
# ── uv package manager ────────────────────────────────────────────────────────
|
|
RUN pipx install uv && cp /root/.local/bin/uv /usr/local/bin/uv && cp /root/.local/bin/uvx /usr/local/bin/uvx
|
|
|
|
# ── Non-root developer user 'researcher' (UID 1000) ──────────────────────────
|
|
RUN adduser -D -u 1000 researcher
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
XDG_CACHE_HOME=/home/researcher/.cache \
|
|
UV_LINK_MODE=copy
|
|
|
|
USER researcher
|
|
WORKDIR /home/researcher/stack
|
|
|
|
# ── Python 3.11 venv + all repo-required packages ────────────────────────────
|
|
RUN uv python install 3.11.15 \
|
|
&& uv venv --clear --python 3.11.15 /home/researcher/venv
|
|
|
|
# Core infrastructure / ingestion dependencies
|
|
RUN uv pip install --python /home/researcher/venv/bin/python3 \
|
|
# AWS + RDS IAM auth
|
|
boto3 \
|
|
botocore \
|
|
# Postgres
|
|
psycopg2-binary \
|
|
# HTTP clients
|
|
requests \
|
|
httpx \
|
|
# API server (swarm API, credential server)
|
|
fastapi \
|
|
"uvicorn[standard]" \
|
|
pydantic \
|
|
# Notion + Linear clients
|
|
notion-client \
|
|
# Data / serialisation
|
|
python-dotenv \
|
|
pyyaml \
|
|
rich \
|
|
# Science / math baseline (from requirements-optional-science.txt)
|
|
biopython \
|
|
networkx \
|
|
pycryptodome \
|
|
zstandard \
|
|
z3-solver \
|
|
PyWavelets \
|
|
# galois>=0.4 needs numba->llvmlite which requires LLVM; install separately on host if needed
|
|
# Numerics
|
|
numpy \
|
|
scipy \
|
|
# Search / web
|
|
beautifulsoup4 \
|
|
lxml \
|
|
# Lean / symbolic
|
|
sympy \
|
|
# Testing
|
|
pytest \
|
|
&& :
|
|
|
|
# ── elan (Lean 4 Version Manager) ────────────────────────────────────────────
|
|
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf \
|
|
| sh -s -- -y --default-toolchain leanprover/lean4:stable
|
|
|
|
# ── PATH ──────────────────────────────────────────────────────────────────────
|
|
ENV PATH="/home/researcher/.elan/bin:/home/researcher/venv/bin:/home/researcher/.local/bin:${PATH}"
|
|
|
|
# ── rclone S3 gateway init script ─────────────────────────────────────────────
|
|
COPY --chown=researcher:researcher .devcontainer/init-rclone-s3.sh /home/researcher/init-rclone-s3.sh
|
|
RUN chmod +x /home/researcher/init-rclone-s3.sh
|
|
|
|
ENTRYPOINT ["/home/researcher/init-rclone-s3.sh"]
|
|
CMD ["/bin/bash"]
|