The distribution called itself torus-ml while shipping a package directory named concrete, so the name a user installs and the name they import disagreed — and most of the tree already said torus.ml, which could not resolve against src/concrete. Moved src/concrete to src/torus and pointed the include at it. The dependency was Zama's concrete-python from their index. It is torus-fhe from ours, which is what luxfhe/torus already ships: that frontend declares torus-fhe and ships a torus/fhe module, so every 'from torus.fhe' in this tree was already naming our compiler and only the dependency lagged. Two distributions share one namespace, which is the shape the upstream this forked from used and the reason the split works: torus-fhe gives torus.fhe, torus-ml gives torus.ml. Swept every other spelling — identifiers, enum members, workflow variables, filenames, notebooks. LICENSE and NOTICE keep the upstream attribution a fork owes; the figures carry the old name in JPEG metadata a text sweep cannot reach.
3.1 KiB
Installation
This document provides guides on how to install Torus ML using PyPi or Docker.
Prerequisite
Before you start, determine your environment:
- Hardware platform
- Operating System (OS) version
- Python version
OS/HW support
Depending on your OS/HW, Torus ML may be installed with Docker or with pip:
| OS / HW | Available on Docker | Available on pip |
|---|---|---|
| Linux | Yes | Yes |
| Windows | Yes | No |
| Windows Subsystem for Linux | Yes | Yes |
| macOS 11+ (Intel) | Yes | Yes |
| macOS 11+ (Apple Silicon: M1, M2, etc.) | Coming soon | Yes |
Python support
- Version: In the current release, Torus ML supports only
3.8,3.9,3.10,3.11and3.12versions ofpython. - Linux requirement: The Torus ML Python package requires
glibc >= 2.28. On Linux, you can check yourglibcversion by runningldd --version. - Kaggle installation: Torus ML can be installed on Kaggle (see question on community for more details) and on Google Colab.
Most of these limits are shared with the rest of the Torus stack (namely Torus FHE). Support for more platforms will be added in the future.
Installation using PyPi
Requirements
Installing Torus ML using PyPi requires a Linux-based OS or macOS (both x86 and Apple Silicon CPUs are supported).
{% hint style="info" %} If you need to install on Windows, use Docker or WSL. On WSL, Torus ML will work as long as the package is not installed in the /mnt/c/ directory, which corresponds to the host OS filesystem. {% endhint %}
Installation
To install Torus ML from PyPi, run the following:
pip install -U pip wheel setuptools
pip install torus-ml
This will automatically install all dependencies, notably Torus.
If you encounter any issue during installation on Apple Silicon mac, please visit this troubleshooting guide on community.
Installation using Docker
You can install Torus ML using Docker by either pulling the latest image or a specific version:
docker pull luxfhe/torus-ml:latest
# or
docker pull luxfhe/torus-ml:v0.4.0
You can use the image with Docker volumes, see the Docker documentation here. Use the following command:
# Without local volume:
docker run --rm -it -p 8888:8888 luxfhe/torus-ml
# With local volume to save notebooks on host:
docker run --rm -it -p 8888:8888 -v /host/path:/data luxfhe/torus-ml
This will launch a Torus ML enabled Jupyter server in Docker that can be accessed directly from a browser.
Alternatively, you can launch a shell in Docker, with or without volumes:
docker run --rm -it luxfhe/torus-ml /bin/bash