forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (36 loc) · 1.11 KB
/
Copy pathDockerfile
File metadata and controls
41 lines (36 loc) · 1.11 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
#---
# name: python
# group: build
# depends: [build-essential, pip_cache]
# buildkit_device: nvidia.com/gpu=all
# notes: installs core `python3` packages and `pip`
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG PYTHON_VERSION \
PYTHON_FREE_THREADING=0 \
TMP=/tmp/python
ENV PYTHON_VERSION=${PYTHON_VERSION} \
PYTHON_FREE_THREADING=${PYTHON_FREE_THREADING} \
PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=utf-8 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=true \
PIP_CACHE_PURGE=true \
PIP_ROOT_USER_ACTION=ignore \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
PIP_WHEEL_DIR=/opt/wheels \
PIP_VERBOSE=1 \
TWINE_NON_INTERACTIVE=1 \
DEBIAN_FRONTEND=noninteractive \
PATH=/opt/venv/bin:$PATH \
UV_PYTHON=/opt/venv/bin/python
#PYTHONPATH=/opt/venv/lib/python${PYTHON_VERSION_ARG}/site-packages:/usr/lib/python3/dist-packages:$PYTHONPATH \
COPY install.sh $TMP/
RUN $TMP/install.sh
# Set PYTHON_GIL=0 for free-threaded builds
RUN if [ "${PYTHON_FREE_THREADING}" = "1" ]; then \
echo "export PYTHON_GIL=0" >> /etc/bash.bashrc; \
fi