§2024-12-14
- Insatlling anaconda on JetsonOrinNano machine
curl -O https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-aarch64.sh
$ ls -l
total 3705872
-rw-rw-r-- 1 alexlai alexlai 884179536 十二 14 17:14 Anaconda3-2024.10-1-Linux-aarch64.sh
$ bash Anaconda3-2024.10-1-Linux-aarch64.sh
Welcome to Anaconda3 2024.10-1
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
...
Version 4.0 | Last Modified: March 31, 2024 | ANACONDA TOS
Do you accept the license terms? [yes|no]
>>> yes
Anaconda3 will now be installed into this location:
/home/alexlai/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/alexlai/anaconda3] >>>
PREFIX=/home/alexlai/anaconda3
Unpacking payload ...
...
zlib-ng pkgs/main/linux-aarch64::zlib-ng-2.0.7-h998d150_0
zope pkgs/main/linux-aarch64::zope-1.0-py312hd43f75c_1
zope.interface pkgs/main/linux-aarch64::zope.interface-5.4.0-py312h998d150_0
zstandard pkgs/main/linux-aarch64::zstandard-0.23.0-py312hc476304_0
zstd pkgs/main/linux-aarch64::zstd-1.5.6-h6a09583_0
Downloading and Extracting Packages:
Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
run the following command when conda is activated:
conda config --set auto_activate_base false
You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> no
You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:
eval "$(/home/alexlai/anaconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
To install conda's shell functions for easier access, first activate, then:
conda init
Thank you for installing Anaconda3!
- Set UP PYTHON-3.10.15 enviroment control
$ export PATH=~/anaconda3/bin/:$PATH
$ conda create -n PY-3.10.15 python=3.10.15 -c conda-forge
Channels:
- conda-forge
- defaults
Platform: linux-aarch64
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/alexlai/anaconda3/envs/PY-3.10.15
added / updated specs:
- python=3.10.15
The following packages will be downloaded:
package | build
---------------------------|-----------------
_openmp_mutex-4.5 | 2_gnu 23 KB conda-forge
bzip2-1.0.8 | h68df207_7 185 KB conda-forge
ca-certificates-2024.8.30 | hcefe29a_0 155 KB conda-forge
ld_impl_linux-aarch64-2.43 | h80caac9_2 682 KB conda-forge
libffi-3.4.2 | h3557bc0_5 58 KB conda-forge
libgcc-14.2.0 | he277a41_1 523 KB conda-forge
libgcc-ng-14.2.0 | he9431aa_1 53 KB conda-forge
libgomp-14.2.0 | he277a41_1 453 KB conda-forge
liblzma-5.6.3 | h86ecc28_1 121 KB conda-forge
liblzma-devel-5.6.3 | h86ecc28_1 368 KB conda-forge
libnsl-2.0.1 | h31becfc_0 34 KB conda-forge
libsqlite-3.47.2 | h5eb1b54_0 1018 KB conda-forge
libuuid-2.38.1 | hb4cce97_0 35 KB conda-forge
libxcrypt-4.4.36 | h31becfc_1 112 KB conda-forge
libzlib-1.3.1 | h86ecc28_2 65 KB conda-forge
ncurses-6.5 | hcccb83c_1 903 KB conda-forge
openssl-3.4.0 | h86ecc28_0 3.3 MB conda-forge
pip-24.3.1 | pyh8b19718_0 1.2 MB conda-forge
python-3.10.15 |hbf90c55_2_cpython 12.4 MB conda-forge
readline-8.2 | h8fc344f_1 287 KB conda-forge
setuptools-75.6.0 | pyhff2d567_1 756 KB conda-forge
tk-8.6.13 | h194ca79_0 3.2 MB conda-forge
tzdata-2024b | hc8b5060_0 119 KB conda-forge
wheel-0.45.1 | pyhd8ed1ab_1 61 KB conda-forge
xz-5.6.3 | h2dbfc1b_1 23 KB conda-forge
xz-gpl-tools-5.6.3 | h2dbfc1b_1 32 KB conda-forge
xz-tools-5.6.3 | h86ecc28_1 94 KB conda-forge
------------------------------------------------------------
Total: 26.1 MB
The following NEW packages will be INSTALLED:
_openmp_mutex conda-forge/linux-aarch64::_openmp_mutex-4.5-2_gnu
bzip2 conda-forge/linux-aarch64::bzip2-1.0.8-h68df207_7
ca-certificates conda-forge/linux-aarch64::ca-certificates-2024.8.30-hcefe29a_0
ld_impl_linux-aar~ conda-forge/linux-aarch64::ld_impl_linux-aarch64-2.43-h80caac9_2
libffi conda-forge/linux-aarch64::libffi-3.4.2-h3557bc0_5
libgcc conda-forge/linux-aarch64::libgcc-14.2.0-he277a41_1
libgcc-ng conda-forge/linux-aarch64::libgcc-ng-14.2.0-he9431aa_1
libgomp conda-forge/linux-aarch64::libgomp-14.2.0-he277a41_1
liblzma conda-forge/linux-aarch64::liblzma-5.6.3-h86ecc28_1
liblzma-devel conda-forge/linux-aarch64::liblzma-devel-5.6.3-h86ecc28_1
libnsl conda-forge/linux-aarch64::libnsl-2.0.1-h31becfc_0
libsqlite conda-forge/linux-aarch64::libsqlite-3.47.2-h5eb1b54_0
libuuid conda-forge/linux-aarch64::libuuid-2.38.1-hb4cce97_0
libxcrypt conda-forge/linux-aarch64::libxcrypt-4.4.36-h31becfc_1
libzlib conda-forge/linux-aarch64::libzlib-1.3.1-h86ecc28_2
ncurses conda-forge/linux-aarch64::ncurses-6.5-hcccb83c_1
openssl conda-forge/linux-aarch64::openssl-3.4.0-h86ecc28_0
pip conda-forge/noarch::pip-24.3.1-pyh8b19718_0
python conda-forge/linux-aarch64::python-3.10.15-hbf90c55_2_cpython
readline conda-forge/linux-aarch64::readline-8.2-h8fc344f_1
setuptools conda-forge/noarch::setuptools-75.6.0-pyhff2d567_1
tk conda-forge/linux-aarch64::tk-8.6.13-h194ca79_0
tzdata conda-forge/noarch::tzdata-2024b-hc8b5060_0
wheel conda-forge/noarch::wheel-0.45.1-pyhd8ed1ab_1
xz conda-forge/linux-aarch64::xz-5.6.3-h2dbfc1b_1
xz-gpl-tools conda-forge/linux-aarch64::xz-gpl-tools-5.6.3-h2dbfc1b_1
xz-tools conda-forge/linux-aarch64::xz-tools-5.6.3-h86ecc28_1
Proceed ([y]/n)? y
...
ownloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate PY-3.10.15
#
# To deactivate an active environment, use
#
# $ conda deactivate
- testing
alexlai@JetsonOrinNano:~/build/src$ conda activate PY-3.10.15
CondaError: Run 'conda init' before 'conda activate'
alexlai@JetsonOrinNano:~/build/src$ conda init
no change /home/alexlai/anaconda3/condabin/conda
no change /home/alexlai/anaconda3/bin/conda
no change /home/alexlai/anaconda3/bin/conda-env
no change /home/alexlai/anaconda3/bin/activate
no change /home/alexlai/anaconda3/bin/deactivate
no change /home/alexlai/anaconda3/etc/profile.d/conda.sh
no change /home/alexlai/anaconda3/etc/fish/conf.d/conda.fish
no change /home/alexlai/anaconda3/shell/condabin/Conda.psm1
no change /home/alexlai/anaconda3/shell/condabin/conda-hook.ps1
no change /home/alexlai/anaconda3/lib/python3.12/site-packages/xontrib/conda.xsh
no change /home/alexlai/anaconda3/etc/profile.d/conda.csh
modified /home/alexlai/.bashrc
==> For changes to take effect, close and re-open your current shell. <==
log out and in
alexlai@MacMini ~ % ssh 192.168.2.229
alexlai@192.168.2.229's password:
Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.148-tegra aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
Expanded Security Maintenance for Applications is not enabled.
205 updates can be applied immediately.
99 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
21 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm
Last login: Sat Dec 14 17:03:58 2024 from 192.168.48.133
(base) alexlai@JetsonOrinNano:~$ conda activate PY-3.10.15
(PY-3.10.15) alexlai@JetsonOrinNano:~$ which python3
/home/alexlai/anaconda3/envs/PY-3.10.15/bin/python3
(PY-3.10.15) alexlai@JetsonOrinNano:~$ which pip3
/home/alexlai/anaconda3/envs/PY-3.10.15/bin/pip3
(PY-3.10.15) alexlai@JetsonOrinNano:~$ which pip
/home/alexlai/anaconda3/envs/PY-3.10.15/bin/pip
(PY-3.10.15) alexlai@JetsonOrinNano:~$ which python
/home/alexlai/anaconda3/envs/PY-3.10.15/bin/python
(PY-3.10.15) alexlai@JetsonOrinNano:~$ pip install pip --upgrade
Requirement already satisfied: pip in ./anaconda3/envs/PY-3.10.15/lib/python3.10/site-packages (24.3.1)
- install pytorch-gpu
conda install conda-forge::pytorch-gpu
(PY-3.10.15) alexlai@JetsonOrinNano:~$ python3
Python 3.10.15 | packaged by conda-forge | (main, Oct 16 2024, 01:19:28) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> library(torch)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'library' is not defined
>>> import torch
>>> torch.cuda.is_available()
True
>>> x = torch.rand(5, 3)
>>> print(x)
tensor([[0.8454, 0.6465, 0.5114],
[0.4604, 0.5898, 0.0470],
[0.0554, 0.9154, 0.8002],
[0.8239, 0.5973, 0.2294],
[0.7497, 0.9780, 0.4820]]) ```