Skip to content

OctoML @ DockerCon23

Join Discord

You'll be able to ask questions, create and interact with your bot via OctoAI Discord.

Join the OctoAI Discord server via the following link.

Once you've joined the OctoAI Discord, we'll ask you to join the following two channels:

  • #dockercon23 (public) - a place for announcements, sharing tips, reporting issues, and helping each other out.
  • #dockercon23-bots (private) - a place for us to deploy our bots and share our creations. The organizers will share an invite link to the attendees for you all to join our channel.

Get a DockerHub account

DockerHub is a place where you can upload and manage your model container images.

Sign up or sign to DockerHub

If you don't already have a DockerHub account, go to the DockerHub sign up page to get set up. Enter your email, username and password, and follow the sign-up instructions.

If you do have an account already, go to the DockerHub website, and hit "Sign in".

Create a DockerHub API token

On the DockerHub page, you'll need to click on your username on the upper right.

  • Click on account settings.
  • On the left tab, click on Security.
  • Create a new token by clicking on the New Access Token button.
  • Provide a description (e.g. "dockercon23")
  • Leave to access permissions to Read, Write, Delete
  • Hit Generate.
  • Save the personal access token somewhere safe. We'll need it later to login to the docker CLI.

Create an OctoAI account

Go to the OctoML website.

Click on Sign Up.

Follow the instructions for creating an OctoAI account. You'll be set up with $11 in credits, which we'll be using for this lab.

Get setup with an AWS dev instance

1 - You are attending the DockerCon 2023 AI/ML workshop

If you're following this as part of DockerCon 2023, our team will provide you with the information to access your AWS instance. Make sure when they provide that information to you that you can access the AWS development instance we've provisioned for you.

Go to this spreadsheet to retrieve your own EC2 instance information:

  • Under the "EC2 address", retrieve the AWS instance address, e.g. ec2-X-X-X-X.compute-1.amazonaws.com. The username to be used on this machine will be ubuntu.
  • Under the "pem key", you can download a dockercon23-attendee.pem file that lets you access the machine - download it onto your laptop, move it to the directory of your choice. DO NOT REDISTRIBUTE.
    • Change the permissions of this dockercon23-attendee.pem file by running chmod 600 dockercon23-attendee.pem in a terminal in the directory where you have the .pem file saved.

Now skip #2 below and jump to the Set up your AWS instance to SSH into your instance and configure it properly.

2 - You are following this tutorial after DockerCon 2023 AI/ML workshop

Get an AWS instance

You'll just need to create an instance in AWS EC2:

  • We recommend use a g5.2xlarge instance.
  • Use the Deep Learning AMI GPU Python 2.0.1, Ubuntu 20.04.
  • Allocate preferably at least 128GB, preferably 256GB of gp3 disk space.

Now ssh into your instance.

Clone the DockerCon23 OctoML Labs repo

Once you're on the AWS instance, you'll clone the github repo

cd ~
git clone git@github.com:octoml/dockercon23-octoai.git

Python environment set up

On your AWS machine, install venv and pip packages.

cd ~
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r dockercon23-octoai/requirements.txt

Every time you ssh into your machine make sure to source the virtual environment file in order to access all of the dependencies we've installed in the requirements file.

cd ~
source .venv/bin/activate

Set up your AWS instance

SSH into your instance

Open a terminal or SSH client on your laptop, and go to the directory where you've saved the .pem file.

We'll SSH into the machine and set up port forwarding so we can interact with the jupyter notebooks from our laptops. Make sure to replace the placeholder EC2 address with your own.

ssh -i "dockercon23-attendee.pem" -L 8888:localhost:8888 ubuntu@ec2-X-X-X-X.compute-1.amazonaws.com

Note the -L 8888:localhost:8888 we've added in there to perform port forwarding of the port 8888 of the AWS instance onto your laptop's port 8888.

Docker CLI set up

The AMI should come pre-installed with Docker.

Enter

docker login -u <your dockerhub username>

At the password prompt, enter the DockerHub personal access token you saved earlier.

Starting the Labs

Now jump over to Part 1 to get started on the lab!./