forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·52 lines (40 loc) · 1.4 KB
/
install.sh
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
#!/usr/bin/env bash
# Python installer
set -x
apt-get update
apt-get install -y --no-install-recommends \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev
which python${PYTHON_VERSION}
return_code=$?
set -e
if [ $return_code != 0 ]; then
echo "-- using deadsnakes ppa to install Python ${PYTHON_VERSION}"
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install -y --no-install-recommends \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev
fi
rm -rf /var/lib/apt/lists/*
apt-get clean
curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} || \
curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3.6
ln -s /usr/bin/python${PYTHON_VERSION} /usr/local/bin/python3
#ln -s /usr/bin/pip${PYTHON_VERSION} /usr/local/bin/pip3
# this was causing issues downstream (e.g. Python2.7 still around in Ubuntu 18.04, \
# and in cmake python enumeration where some packages expect that 'python' is 2.7) \
#RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ \
# update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 \
which python3
python3 --version
which pip3
pip3 --version
python3 -m pip install --upgrade pip pkginfo --index-url https://pypi.org/simple
pip3 install --no-cache-dir --verbose --no-binary :all: psutil
pip3 install --upgrade --no-cache-dir \
setuptools \
packaging \
'Cython<3' \
wheel \
twine