-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
41 lines (32 loc) · 1.1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.12-slim as base
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.8.4 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
PYSETUP_PATH="/opt/pysetup"
ENV PATH="/root/.cargo/bin:$POETRY_HOME/bin:$PATH"
WORKDIR $PYSETUP_PATH
FROM base as builder
# Install build deps
RUN apt-get update && apt-get install -y curl clang git libssl-dev make pkg-config
# Install Rust stable
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
# Install poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Install project
COPY pyproject.toml poetry.lock ./
RUN poetry install --only main
COPY . ./
RUN poetry install
FROM base as application
ENV CATALOG_PATH=/catalog
# Copy python environment from builder
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY ./nautilus_data $PYSETUP_PATH/nautilus_data
# Generate data catalog
RUN python -m nautilus_data.hist_data_to_catalog