Set up Optimium
What we are going to do
In the previous Quickstart page, we ran Optimium within the provided Docker image. However, in this tutorial, we'll install Optimium and Optimium Runtime in your local environment.
Requirements
If you haven't reviewed Quickstart, we strongly recommend going through it first. We assume you have already obtained the license key during that process.
Device requirements
- AMD64 PC
- Ubuntu 20.04 or 22.04
- Python3 (versions 3.8 to 3.10)
1. Download Optimium SDK
Download Optimium_SDK.zip
from the Google Drive URL we shared with you via email. For all the code blocks below, we will assume you are in the directory where you downloaded Optimium_SDK.zip
.
Then use the unzip
command or a file explorer to extract the files from the ZIP file.
~$ unzip Optimium_SDK.zip
*Note that each subdirectory in optimium
contains the same wheel packages but for different Python versions.
unzip Optimium_SDK.zip
tree Optimium_SDK
~/Optimium_SDK/
├── install_requirements.sh
├── setup.sh
├── optimium
| ├── install_optimium.sh
| ├── python3.8
| | ├── optimium-1.0.8-cp38-cp38-linux_x86_64.whl
| | ├── zaiConverter-2.1.2-cp38-cp38-linux_x86_64.whl
| | ├── OpMeta-0.1-cp38-cp38-linux_x86_64.whl
| ├── python3.9
| └── python3.10
├── nadya
| └── nadya_0.2.16_amd64.deb
└── runtime
├── install_runtime.sh
├── runtime-docs/
└── runtime/
##
2. Optimium Installation
Optimium is provided as a Python package, but there are a few prerequisites. To simplify the installation, we provide a bash script for easy setup.
1️⃣ Install dependency packages
Note that this requires sudo
permissions; therefore, if you don't have these permissions, please ask your administrator.
cd Optimium_SDK
chmod +x install_requirements.sh
sudo ./install_requirements.sh
2️⃣ Install
The provided scripts automatically detect your Python version and install the corresponding Optimium package as long as pip3
is accessible (version detection is based on pip3
).
IMPORTANT!
Currently, Optimium supports Python versions up to 3.10 (≤ 3.10). If you are using a higher version, please use Docker or a virtual environment such as Anaconda or virtualenv.
cd Optimium_SDK
chmod +x setup.sh
./setup.sh
3. Optimium Runtime Installation
1️⃣ Install OpenMP (this requires sudo
permissions)
# If your libomp5 version is below 10, use libomp5-10 instead.
sudo apt-get install libomp5
# Make symbolic link to prevent error.
MULTIARCH=$(dpkg-architecture -q DEB_TARGET_MULTIARCH)
sudo ln -s "/usr/lib/$MULTIARCH/libomp.so.5" "/usr/lib/$MULTIARCH/libomp.so"
2️⃣ Install Optimium Runtime via pip
.
cd Optimium_SDK/
pip install -f "runtime/python" optimium-runtime[all]
4. Test to see if it's installed successfully
Run the following code. If no errors(such as ModuleNotFoundError
) appear, the installation was successful.
WORKING_DIR=$PWD python3 -c "import optimium"
WORKING_DIR=$PWD python3 -c "import optimium.runtime"
Updated 6 months ago