Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Exclude files from Docker build context. This prevents unnecessary files from
# being sent to Docker daemon, reducing build time and image size.

# Python artifacts
__pycache__/
*.pyc
*.pyo
*.pyd
*.egg-info/

# Virtual environments
venv/
.venv/
env/
.env
.envrc
client_venv.helpers/
ENV/

# Jupyter
.ipynb_checkpoints/
.jupyter/

# Build artifacts
build/
dist/
*.eggs/
.eggs/

# Cache and temporary files
*.log
*.tmp
*.cache
.pytest_cache/
.mypy_cache/
.coverage
htmlcov/

# Git and version control
.git/
.gitignore
.gitattributes
.github/

# Docker build scripts (not needed at runtime)
docker_build.sh
docker_push.sh
docker_clean.sh
docker_exec.sh
docker_cmd.sh
docker_bash.sh
docker_jupyter.sh
docker_name.sh
run_jupyter.sh
Dockerfile.*
.dockerignore

# Documentation
README.md
README.admin.md
docs/
*.md
CHANGELOG.md
LICENSE

# Configuration and secrets
.env.*
.env.local
.env.development
.env.production
.DS_Store
Thumbs.db

# Shell configuration
.bashrc
.bash_history
.zshrc

# Large data files (mount via volume instead)
data/
*.csv
*.pkl
*.h5
*.parquet
*.feather
*.arrow
*.npy
*.npz

# Generated images
*.png
*.jpg
*.jpeg
*.gif
*.svg
*.pdf

# Test files and examples
tests/
test_*
*_test.py
tutorials/
examples/

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~
.project
.pydevproject
.settings/
*.iml
.sublime-project
.sublime-workspace

# Node and frontend (if applicable)
node_modules/
npm-debug.log
yarn-error.log
.npm

# Requirements management
requirements.in
Pipfile
Pipfile.lock
poetry.lock
setup.py
setup.cfg

# CI/CD configuration
.gitlab-ci.yml
.travis.yml
Jenkinsfile
.circleci/

# Miscellaneous
*.bak
.venv.bak/
*.whl
*.tar.gz
*.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Use Python 3.12 slim (already has Python and pip).
FROM python:3.12-slim

# Avoid interactive prompts during apt operations.
ENV DEBIAN_FRONTEND=noninteractive

# Install CA certificates (needed for HTTPS).
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Install project specific packages.
RUN mkdir -p /install
COPY requirements.txt /install/requirements.txt
RUN pip install --upgrade pip && \
pip install --no-cache-dir jupyterlab jupyterlab_vim jupytext -r /install/requirements.txt

# Config.
COPY etc_sudoers /install/
COPY etc_sudoers /etc/sudoers
COPY bashrc /root/.bashrc

# Report package versions.
COPY version.sh /install/
RUN /install/version.sh 2>&1 | tee version.log

# Jupyter.
EXPOSE 8888

CMD ["/bin/bash"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use Python 3.12 slim (already has Python and pip).
FROM python:3.12-slim

# Avoid interactive prompts during apt operations.
ENV DEBIAN_FRONTEND=noninteractive

# Install CA certificates (needed for HTTPS).
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Install project specific packages.
RUN mkdir -p /install
COPY requirements.txt /install/requirements.txt
RUN pip install --upgrade pip && \
pip install --no-cache-dir jupyterlab jupyterlab_vim jupytext -r /install/requirements.txt

# Config.
COPY etc_sudoers /install/
COPY etc_sudoers /etc/sudoers
COPY bashrc /root/.bashrc

# Report package versions.
COPY version.sh /install/
RUN /install/version.sh 2>&1 | tee version.log

# Jupyter.
EXPOSE 8888
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND noninteractive

# Install system utilities and Python in a single layer.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
sudo \
curl \
git \
build-essential \
python3 \
python3-pip \
python3-dev \
python3-venv \
&& rm -rf /var/lib/apt/lists/*

# Create virtual environment.
RUN python3 -m venv /opt/venv

# Make the venv the default Python.
ENV PATH="/opt/venv/bin:$PATH"

# Install project specific packages.
RUN mkdir /install
COPY requirements.txt /install/requirements.txt
RUN pip install --upgrade pip && \
pip install --no-cache-dir jupyterlab jupyterlab_vim jupytext -r /install/requirements.txt

# Config.
COPY etc_sudoers /install/
COPY etc_sudoers /etc/sudoers
COPY bashrc /root/.bashrc

# Report package versions.
COPY version.sh /install/
RUN /install/version.sh 2>&1 | tee version.log

# Jupyter.
EXPOSE 8888
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND noninteractive

# Install system utilities and Python in a single layer.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
sudo \
curl \
git \
build-essential \
python3 \
python3-pip \
python3-dev \
python3-venv \
libgomp1 \
g++ \
&& rm -rf /var/lib/apt/lists/*

# Install uv for package management.
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"

# Install project specific packages using uv.
COPY pyproject.toml uv.lock /app/
WORKDIR /app
RUN uv sync
ENV PATH="/app/.venv/bin:$PATH"

# Install Jupyter.
RUN pip install --upgrade pip && \
pip install --no-cache-dir jupyterlab jupyterlab_vim jupytext

# Copy project files.
COPY . /app

RUN mkdir /install

# Config.
COPY etc_sudoers /install/
COPY etc_sudoers /etc/sudoers
COPY bashrc /root/.bashrc

# Report package versions.
COPY version.sh /install/
RUN /install/version.sh 2>&1 | tee version.log

# Jupyter.
EXPOSE 8888
Loading