Skip to content
Merged
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
39 changes: 31 additions & 8 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,44 @@
FROM python:3.11-slim AS base
LABEL maintainer="emilcode-dev"

# Poetry environment
# https://python-poetry.org/docs/configuration/#using-environment-variables
ENV POETRY_VERSION=2.2.1 \
POETRY_HOME="/opt/poetry" \
# do not ask any interactive question
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false

ENV PATH="$POETRY_HOME/bin:$PATH"

# Additional dev tooling (e.g. Git, etc.)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
tree \
curl \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*

# install poetry - respects $POETRY_VERSION & $POETRY_HOME
RUN curl -sSL https://install.python-poetry.org | python3 -

# Set working directory
WORKDIR /workspace

# Install Python dependencies
RUN pip install --upgrade pip
# Copy only dependency-related files first (for better build caching)
COPY ./poetry.lock ./pyproject.toml ./

# Install only runtime dependencies (without dev dependencies)
RUN poetry install --only main --no-root


# ---- Development image ----
FROM base AS dev

RUN apt-get update && apt-get install -y --no-install-recommends \
git \
tree

# Install requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install all dependencies (including dev/test/docs)
RUN poetry install --no-root

# CMD ["python", "main.py"]
# Default entrypoint — start bash
ENTRYPOINT ["/bin/bash"]
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"name": "nightingale",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
"context": "..",
"target": "dev"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter@2025.7.0",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.datawrangler",
Expand All @@ -23,6 +24,6 @@
}
}
},
"postCreateCommand": "echo 'nightingale dev container is ready!'"
"postCreateCommand": "poetry install && echo 'nightingale dev container is ready!'"
}

Loading