mirror of
https://github.com/luxfi/fhe-ml.git
synced 2026-10-30 19:52:59 +00:00
91 lines
2.8 KiB
YAML
91 lines
2.8 KiB
YAML
name: CMLBuild
|
|
description: Build concrete-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: InstallConcreteML
|
|
action: ExecuteBash
|
|
inputs:
|
|
commands:
|
|
- virtualenv venv --python=python3.9
|
|
- echo "source $(pwd)/venv/bin/activate" >> .bashrc
|
|
- source venv/bin/activate
|
|
- python -m pip install "concrete-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://concrete-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]:zama-ai/concrete-ml.git
|
|
- cd concrete-ml
|
|
- git lfs pull
|
|
- git checkout v$(pip show concrete-ml | grep "Version" | cut -c 10-)
|
|
- pytest ./tests -k "not test_deploy"
|