-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (37 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
45 lines (37 loc) · 1.21 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
# https://github.com/ucyo/python-package-template/blob/master/Dockerfile
FROM python:3.9-slim as rye
ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8" \
PATH="/home/python/.local/bin:/home/python/.rye/shims:$PATH" \
PIP_NO_CACHE_DIR="false" \
RYE_VERSION="0.43.0" \
RYE_INSTALL_OPTION="--yes" \
LABELBOX_TEST_ENVIRON="prod"
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
inotify-tools \
make \
# cv2
libsm6 \
libxext6 \
ffmpeg \
libfontconfig1 \
libxrender1 \
libgl1 \
libglx-mesa0 \
libgeos-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1000 python && \
useradd --uid 1000 --gid python --shell /bin/bash --create-home python
USER 1000
WORKDIR /home/python/
RUN curl -sSf https://rye.astral.sh/get | bash -
COPY --chown=python:python . /home/python/labelbox-python/
WORKDIR /home/python/labelbox-python
RUN rye config --set-bool behavior.global-python=true && \
rye config --set-bool behavior.use-uv=true && \
rye pin 3.9 && \
rye sync
CMD cd libs/labelbox && rye run integration && rye sync -f --features labelbox/data && rye run unit && rye run data