Files
torus-ml/ci/aws_ami_build_component.yaml
zeekay e037e8f7ea torus: one name for the package, and it is ours
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.
2026-08-27 13:20:50 -07:00

91 lines
2.8 KiB
YAML

name: CMLBuild
description: Build torus-ml with Python 3.9 for x86 plateform.
schemaVersion: 1.0
phases:
- name: build
steps:
- name: RestartDeamonsWithOutdatedLibsAutomatically
action: ExecuteBash
inputs:
commands:
- sed -i "/#\$nrconf{restart} = 'i';/s/.*/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf
- name: AddDeadsnakePPA
action: ExecuteBash
inputs:
commands:
- add-apt-repository -y ppa:deadsnakes/ppa
- name: UpdatePackages
action: ExecuteBash
inputs:
commands:
- apt update
- apt upgrade -y
- name: InstallPythonVirtualenv
action: ExecuteBash
inputs:
commands:
- apt install -y python3-virtualenv
- name: InstallPython39
action: ExecuteBash
inputs:
commands:
- apt install -y python3.9 python3.9-distutils
- name: InstallTorusML
action: ExecuteBash
inputs:
commands:
- virtualenv venv --python=python3.9
- echo "source $(pwd)/venv/bin/activate" >> .bashrc
- source venv/bin/activate
- python -m pip install "torus-ml[dev]==${CML_VERSION}"
- name: test
steps:
- name: PrepareGithubDeployKeyFile
action: ExecuteBash
inputs:
commands:
- touch ~/.ssh/deploy_private_key
- chmod 600 ~/.ssh/deploy_private_key
- name: DownloadGithubDeployKey
action: S3Download
inputs:
- source: s3://torus-ml-ami-build/github_deploy_private_key
destination: /root/.ssh/deploy_private_key
expectedBucketOwner: ${AWS_ACCOUNT_ID}
- name: SetupGithubDeployKey
action: ExecuteBash
inputs:
commands:
- chmod 400 ~/.ssh/deploy_private_key
- ssh-keyscan github.com >> ~/.ssh/known_hosts
- echo -e "Host github.com\n HostName github.com\n IdentityFile ~/.ssh/deploy_private_key" > ~/.ssh/config
# Dependencies should be maintained manually to sync with pyproject.toml dev deps
- name: InstallDevDependencies
action: ExecuteBash
inputs:
commands:
- apt install -y git-lfs
- git lfs install
# We disable tests for test_deploy file because the instance does not have AWS CLI setup
- name: RunTests
action: ExecuteBash
inputs:
commands:
- source venv/bin/activate
- git clone [email protected]:luxfi/torus-ml.git
- cd torus-ml
- git lfs pull
- git checkout v$(pip show torus-ml | grep "Version" | cut -c 10-)
- pytest ./tests -k "not test_deploy"