зеркало из
https://github.com/VIGINUM-FR/D3lta.git
synced 2025-10-29 13:06:10 +02:00
build: add Dockerfile and devcontainer
Этот коммит содержится в:
родитель
72244a8ade
Коммит
aefc13ce31
30
.devcontainer/Dockerfile
Обычный файл
30
.devcontainer/Dockerfile
Обычный файл
@ -0,0 +1,30 @@
|
||||
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bookworm AS d3lta-prod
|
||||
|
||||
ENV PIP_DISABLE_PIP_VERSION_CHECK=on \
|
||||
PIP_DEFAULT_TIMEOUT=100 \
|
||||
\
|
||||
# Poetry
|
||||
# https://python-poetry.org/docs/configuration/#using-environment-variables
|
||||
POETRY_VERSION=2.1.1 \
|
||||
# make poetry install to this location
|
||||
POETRY_HOME="/opt/poetry" \
|
||||
# do not ask any interactive questions
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
# never create virtual environments automatically
|
||||
POETRY_VIRTUALENVS_CREATE=false
|
||||
|
||||
RUN pip install --no-cache-dir --upgrade pip
|
||||
RUN pipx install poetry==${POETRY_VERSION}
|
||||
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml poetry.lock setup.py README.md ./
|
||||
# pre-install dependencies
|
||||
RUN --mount=type=cache,target=/root/.cache poetry install --no-root
|
||||
|
||||
COPY notebooks /app/notebooks/
|
||||
COPY d3lta /app/d3lta/
|
||||
RUN --mount=type=cache,target=/root/.cache poetry install
|
||||
|
||||
FROM d3lta-prod AS d3lta-dev
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache poetry install --with dev
|
||||
9
.devcontainer/devcontainer.json
Обычный файл
9
.devcontainer/devcontainer.json
Обычный файл
@ -0,0 +1,9 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
||||
{
|
||||
"name": "Python 3",
|
||||
"dockerFile": "./Dockerfile",
|
||||
"context": "..",
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {}
|
||||
}
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user