-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile.task_base
More file actions
65 lines (51 loc) · 1.89 KB
/
Dockerfile.task_base
File metadata and controls
65 lines (51 loc) · 1.89 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM mcr.microsoft.com/azurelinux/base/python:3.12
RUN \
tdnf update -y && \
tdnf install ca-certificates git azure-cli -y \
&& tdnf clean all
# Setup timezone info
ENV TZ=UTC
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV PIP_NO_CACHE_DIR=1
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install common packages
COPY requirements-task-base.txt /tmp/requirements.txt
RUN pip install uv
RUN uv pip install --system -r /tmp/requirements.txt
#
# Copy and install packages
#
COPY pctasks/core /opt/src/pctasks/core
RUN --mount=type=cache,target=/root/.cache \
cd /opt/src/pctasks/core && \
uv pip install --system -r requirements.txt && \
uv pip install --system --no-deps .
COPY pctasks/cli /opt/src/pctasks/cli
RUN --mount=type=cache,target=/root/.cache \
cd /opt/src/pctasks/cli && \
uv pip install --system -r requirements.txt && \
uv pip install --system --no-deps .
COPY pctasks/task /opt/src/pctasks/task
RUN --mount=type=cache,target=/root/.cache \
cd /opt/src/pctasks/task && \
uv pip install --system -r requirements.txt && \
uv pip install --system --no-deps .
COPY pctasks/client /opt/src/pctasks/client
RUN --mount=type=cache,target=/root/.cache \
cd /opt/src/pctasks/client && \
uv pip install --system -r requirements.txt && \
uv pip install --system --no-deps .
COPY pctasks/ingest /opt/src/pctasks/ingest
RUN --mount=type=cache,target=/root/.cache \
cd /opt/src/pctasks/ingest && \
uv pip install --system -r requirements.txt && \
uv pip install --system --no-deps .
COPY pctasks/dataset /opt/src/pctasks/dataset
RUN --mount=type=cache,target=/root/.cache \
cd /opt/src/pctasks/dataset && \
uv pip install --system -r requirements.txt && \
uv pip install --system --no-deps .
# Setup Python Path to allow import of test modules
ENV PYTHONPATH=/opt/src:$PYTHONPATH
WORKDIR /opt/src