# Installation For Linux Users

On Linux it is easiest to install the appropriate binaries directly using the following commands.&#x20;

### Figure Out Which Architecture Your Processor Has

The following command will return the machine hardware name. For example, `x86_64` indicates that you're running on a AMD 64.&#x20;

```bash
uname -m
```

We currently only support AMD 64 for Linux. Please let us know if you have a ARM64 processor, so we know that we should increase priority for supporting ARM64 processors for Linux.&#x20;

### Install Polytope CLI Binaries

```bash
curl -s https://polytope.com/install.sh | sh -s
```

### Docker&#x20;

**This section is not applicable to Windows users, since they should already have followed the Docker Desktop instructions for Windows.** \
\
Ensure that docker is installed and up-to-date. Polytope does not support old versions of Docker.&#x20;

Docker needs to run in rootless mode on Linux. Otherwise files created in mounted directories by code running in containers will be owned by the root user so the user will not have access to the created files.&#x20;

#### Rootless Docker on Ubuntu

This assumes that you have Ubuntu version 24+.

**Install Prerequisites**

```bash
sudo apt -y install uidmap
```

**Create an AppArmor Profile for rootlesskit by running the following block of commands.**

```bash
APPARMOR_FILE="/etc/apparmor.d/home.$USER.bin.rootlesskit"
USER_HOME=$(eval echo ~$USER)

cat <<EOT | sudo tee "$APPARMOR_FILE"
# ref: https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces
abi <abi/4.0>,
include <tunables/global>

~/bin/rootlesskit flags=(unconfined) {
  userns,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/home.$USER.bin.rootlesskit>
}
EOT
```

**Enable unpriviledeged user namespaces**

```bash
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
```

**Install rootless Docker**

```bash
curl -fsSL https://get.docker.com/rootless | sh
```

**Add the following lines to `~/.bashrc`**

```bash
export PATH="$HOME/bin:$PATH"
export DOCKER_HOST="unix:///run/user/$UID/docker.sock"
```

**Load the \~/.bashrc**

```bash
source ~/.bashrc
```

**Start the rootless Docker daemon**

```bash
systemctl --user start docker
```

**Test the Docker daemon**

```bash
docker info
docker run hello-world
```

#### **Docker Desktop**

[Installing Docker Desktop](https://docs.docker.com/desktop/install/linux-install/) is optional for Linux users.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bluetext.dev/polytope/installation-for-linux-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
