-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (33 loc) · 984 Bytes
/
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
42
ARG PYTHON_VERSION=3.12
# https://hub.docker.com/_/python
FROM python:"${PYTHON_VERSION}"-slim
ARG CODE_LOCATION
# set shell to bash
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# set container envs
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PATH=/app/.venv/bin:"${PATH}"
# set workdir
WORKDIR /app
# install uv & create venv
RUN --mount=type=cache,target=/root/.cache/pip \
pip install "uv==0.5.0" --no-cache-dir \
&& uv venv
# install dependencies
COPY pyproject.toml requirements.txt overrides.txt ./
RUN --mount=type=cache,target=/root/.cache/pip \
uv pip install \
-r requirements.txt \
--override overrides.txt \
--no-cache-dir
# install python project
COPY src/teamster/ ./src/teamster/
RUN uv pip install \
-e . \
--override overrides.txt \
--no-cache-dir
# install dbt project
COPY src/dbt/ ./src/dbt/
RUN dagster-dbt project prepare-and-package \
--file src/teamster/code_locations/"${CODE_LOCATION}"/__init__.py