Graalvm tool: native-image-configure not found - graalvm

The link describes the usage of the tool native-image-configure
https://github.com/oracle/graal/blob/master/substratevm/CONFIGURE.md
I am not able to find this tool in Graalvm version 19.0.3.2 for JDK11
Where do i get this tool?

Actually it includes in the native-image package but not as a tool.
You can run it as a java program:
java --add-exports jdk.internal.vm.compiler/org.graalvm.compiler.phases.common=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \
-cp /opt/graalvm-ce-java11-20.1.0/lib/graalvm/svm-agent.jar:/opt/graalvm-ce-java11-20.1.0/lib/svm/builder/svm.jar com/oracle/svm/configure/ConfigurationTool \
generate --resource-input=resource-custom.json --reflect-input=reflect-custom.json --trace-input=trace-log.json --output-dir=./mockserver/native-configure

JDK 11 is not supported with Graalvm version 19.0.3.2.
Please use GraalVM 19.3 with JDK 11.
you can download the same from below link:
https://www.graalvm.org/downloads/
If you are using EE then after installing GraalVM, you can download native image jar file and install it using:
gu intsall -F <jar>
for CE:
download from
https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-19.3.0.2 and than run gu like this
sudo $GRAALVM_HOME/bin/gu -L install ~/Downloads/native-image-installable-svm-java11-darwin-amd64-19.3.0.2.jar

Related

Pydrake has issue with python 3 point 9

Is Python3.9 supported?
I got this error with Python3.9:
File "/home/drake/drake/drake-build/install/lib/python3.6/site-packages/pydrake/common/__init__.py", line 8, in <module> from ._module_py import * ModuleNotFoundError: No module named 'pydrake.common._module_py'
There is no "python3.9" folder in .../install/lib.
I am running Ubuntu 18, and I am building Drake from source with latest github commit in master.
EDIT: Can someone explain how exactly Drake sets up pydrake?
It seems it detects the default Python installation somewhere automatically. I tried with a new installation, the default python was 3.8, and I also install:
apt install -y python3.10
Then I followed Drake python setup instructions.
git clone https://github.com/RobotLocomotion/drake.git
mkdir drake-build
cd drake-build
cmake ../drake
make -j
Pydrake only became available in 3.8. How to make it available for 3.10?
The current version of Pydrake (1.11.0) is officially supported on Ubuntu 20.04 with Python 3.8 and Ubuntu 22.04 with Python 3.10 when building from source. However, we recommend that most users use a binary release, and don't try to rebuild Drake from scratch themselves.
There are precompiled wheels at https://pypi.org/project/drake/ aka pip install drake; helpful installation details are at https://drake.mit.edu/pip.html. The wheels when run on Ubuntu support Python versions 3.8, 3.9, 3.10, or 3.11.
For example:
python3 -m venv env
env/bin/pip install --upgrade pip
env/bin/pip install drake
source env/bin/activate
For additional details, see https://drake.mit.edu/installation.html for full instructions and supported versions.
The last version of Pydrake to support Ubuntu 18.04 was v1.1.0 (released in March of 2022). If you need a newer version of Pydrake, you'll need to use a newer version of Ubuntu.

Pytorch Installation for different CUDA architectures

I have a Dockerfile which installs PyTorch library from the source code.
Here is the snippet from Dockerfile which performs the installation from source code of pytorch
RUN cd /tmp/ \
&& git clone https://github.com/pytorch/pytorch.git \
&& cd pytorch \
&& git submodule sync && git submodule update --init --recursive \
&& sudo TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0" python3 setup.py install
I don't have proper understanding of what's happening here and would appreciate some input from the community:
Why does PyTorch need different way of installation for different CUDA versions?
What is the role of TORCH_CUDA_ARCH_LIST in this context?
If my machine has multiple CUDA setups, does that mean I will have multiple PyTorch versions (specific to each CUDA setup) installed in my Docker container?
If my machine has none of the mentioned CUDA setups ("6.0 6.1 7.0 7.5 8.0"), will the PyTorch installation fail?
From the Nvidia compiler documentation at https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list :
nvcc tag
GPU Architecture
sm_50, sm_52 and sm_53
Maxwell support
sm_60, sm_61, and sm_62
Pascal support
sm_70 and sm_72
Volta support
sm_75
Turing support
sm_80, sm_86 and sm_87
Ampere support
sm_89
Ada support
sm_90, sm_90a
Hopper support
From the above you can garner that sm_50 is 5.0 and so on...

How Do I Install Dart v2?

Ive looked all over the official Dart site. They go into great depth about 'dev' channels and 'stable' channels but no clue whatsover about how to actually install a version of the SDK. There is no information about the current stable and dev versions either.
Clearly I have missed something hiding in plain site. I want to try out some official angulardart component libraries but the builder requires Dart version 2 - but I have no idea how to get that.
Can someone put me out of my misery, and tell me how I'm being an idiot
Thanks
Installation instructions for dart v2 (which currently only has a dev channel release) can be found here. To summarize,
Mac Installation with homebrew
brew tap dart-lang/dart
brew install dart --devel
Edit: If you are upgrading from Dart 1 see, How to upgrade to Dart 2?
Windows Installation
Visit here for the graphical installer or if you have Chocolatey installed do:
choco install dart-sdk -version 2
Linux
sudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo apt-get update
export PATH=/usr/lib/dart/bin:$PATH
sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'
sudo apt-get install dart
Ahhhhhhh. If you go to https://www.dartlang.org/install/archive
And then wait for about 10 minutes, you suddenly get some links. - Problem solved.
The latest version in the dev channel is Dart 2 (2.0.0-alpha.36).
There is no released Dart 2 yet.
This VM and tools can still process most Dart 1 code.
There are several flags to enable Dart 2 features for the VM or tools
--preview-dart-2
--reify-generic-functions
--reify-generics
--limit-ints-to-64-bits
--sync-async
these options are highly experimental and in flux.
Not all tools support the same set of options.
New options might be added or existing ones removed when the behavior becomes the default without previous anouncement.
I found above options in https://github.com/dart-lang/sdk/blob/b0a2e6b9c99d8a13ecd59d1636d5201adc77fc07/tools/testing/dart/test_suite.dart
for windows go to dart.dev for install dart
if you want if dart is install in your pc
1-open terminal and type this command dart --version when will appear version dart
ex: 2.28 (sdkDart)

Install openCV with CUDA toolkit 8.0

I'm trying to install Opencv 3.2.0 and Nvidia CUDA toolkit 8.0 on Ubuntu 16.04 but I can't configure them together. I get the following error when I try to make project using both:
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find CUDA: Found unsuitable version "8.0", but required is exact
version "7.5" (found /usr/local/cuda)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_args)
/usr/local/share/OpenCV/OpenCVConfig.cmake:86 (find_package)
/usr/local/share/OpenCV/OpenCVConfig.cmake:105 (find_host_package)
CMakeLists.txt:10 (find_package)
-- Configuring incomplete, errors occurred!
I have tried installing cuda toolkit 7.5 but its not compatible with ubuntu 16.04 I believe. I'm really clueless now, I hope someone can help with this.
Thanks
so I solved this issue by managing to install toolkit 7.5. Here is how I did it:
Updated nvidia driver for my Operating System
Download cuda toolkit 7.5 and extract it to a folder
$ mkdir ~/Downloads/NVIDIA_TOOLKIT
$ cd ~/Downloads
$ ./cuda_7.5.18_linux.run -extract=~/Downloads/NVIDIA_TOOLKIT;
go to the virtual console by pressing Ctrl + Alt + F1 and turn off
lightdm service
$ sudo service lightdm stop
cd to downloads and install the extracted toolkit and samples
$ cd ~/Downloads/NVIDIA_TOOLKIT
$ sudo ./cuda-linux64-rel-6.0.37-18176142.run
$ sudo ./cuda-samples-linux-6.0.37-18176142.run
Set environment variables in .bashrc file
$ PATH=/usr/local/cuda-7.5/bin
$ LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64
Turn back on the lightdm service
$ sudo service lightdm start
Reboot and you should be able to use the nvcc compiler
For openCV you will have to downgrade your gcc/ g++ compiler to 4.9 since it is not yet compatible with the higher versions

Using RPM to customize an installed Yocto SDK

Is it possible to install a .rpm package into an SDK target sysroot after the SDK has been installed?
The 2.0 Yocto Project Application's Developer Guide Chapter 4 seems to indicate that this can be done, and even provides an example if using opkg for package management. I can't figure out how to customize my target sysroot when using RPM package management.
rpm -i --root /different/sysroot/ some-package.rpm
or even better
dnf install --installroot=/different/sysroot/ some-package.rpm

Resources