# Docker Builds

If you've never used Docker before, check out the [getting started guide.](https://docs.docker.com/get-started/)

Up-to-date prebuilt images can be found [on Docker hub.](https://hub.docker.com/repository/docker/animcogn/face_recognition)

## CPU Images

-	[`cpu-latest`, `cpu`, `cpu-0.1`, `latest`](cpu/Dockerfile)
-	[`cpu-jupyter-kubeflow-latest`, `cpu-jupyter-kubeflow`, `cpu-jupyter-kubeflow-0.1`](cpu-jupyter-kubeflow/Dockerfile)

### GPU Images
-	[`gpu-latest`, `gpu`, `gpu-0.1`](gpu/Dockerfile)
-	[`gpu-jupyter-kubeflow-latest`, `gpu-jupyter-kubeflow`, `gpu-jupyter-kubeflow-0.1`](gpu-jupyter-kubeflow/Dockerfile)

The CPU images should run out of the box without any driver prerequisites.

## GPU Images

### Prerequisites

To use the GPU images, you need to have:
- [The Nvidia drivers](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#nvidia-drivers)
- [The Nvidia-docker container runtime](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit)
- [Docker configured to use the Nvidia container runtime](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/user-guide.html#daemon-configuration-file)

Once you have those installed, you should be ready to start running the GPU instances.

### Testing GPUs

To make sure your GPU instance is setup correctly, run the following in a container:

```markdown
# Docker Builds (maintained by kcee tech)

This directory contains example Docker files and notes for running CPU/GPU and Jupyter images. The documentation here has been adapted and maintained by kcee tech.

CPU and GPU image details, prerequisites, and usage vary by environment. Refer to the Dockerfiles in this directory for exact build steps and contact kcee tech for support.

Example Dockerfile snippet:

```Dockerfile
FROM face_recognition:gpu

COPY requirements.txt requirements.txt

RUN pip3 install -r ./requirements.txt

COPY my_app /my_app

CMD [ "python3", "/my_app/my_app.py" ]
```

```
CMD [ "python3", "/my_app/my_app.py" ]
