Installation
Get started and install BastionLab Client and BastionLab Server.
Pre-requisites
Technical requirements
To install BastionLab Client and BastionLab Server, ensure the following are already installed in your system:
- Python3.7 or greater (get the latest version of Python at https://www.python.org/downloads/ or with your operating systemβs package manager)
- Python Pip (PyPi), the package manager
To install BastionLab Server, you'll also need:
Here's the Docker official tutorial to set it up on your computer.
Installing BastionLab Client
From PyPI
From source
First, you'll need to clone BastionLab repository:
Then install the client library:Installing BastionLab Server
From PyPI
For testing purposes only, BastionLab server can be installed using our pip package.
Warning
This package is meant to quickly setup a running instance of the server and is particularly useful in colab notebooks. It does not provide any mean to configure the server which makes certain features impossible to use (like authentication).
For production, please use the Docker image or install the server from source.
Once installed, the server can be launched using the following script:
And stoped this way:
Using the official Docker image
By locally building the Docker image
Clone the repository and build the image using the Dockerfile:
git clone https://github.com/mithril-security/bastionlab.git
cd ./bastionlab/server
docker build -t bastionlab:0.1.0 -t bastionlab:latest .
From source
First make sure that the following build dependencies (Debian-like systems) are installed on your machine:
Then, clone our repository:
Download and unzip libtorch (Pytorch's C++ backend) from Pytorch's website (you can chose the right build according to your cuda version):cd ./bastionlab
curl -o libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.12.1%2Bcpu.zip
unzip libtorch.zip
To run the server, use: