Skip to content

Commit e6b7109

Browse files
authored
docs: Update docker readme (#3531)
* Update docker readme * Make language changes
1 parent af96e00 commit e6b7109

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

docker/README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,59 @@
1-
# Haystack Docker image
1+
<p align="center">
2+
<a href="https://www.deepset.ai/haystack/"><img src="https://raw.githubusercontent.com/deepset-ai/haystack/main/docs/img/haystack_logo_colored.png" alt="Haystack"></a>
3+
</p>
24

35
Haystack is an end-to-end framework that enables you to build powerful and production-ready
46
pipelines for different search use cases. The Docker image comes with a web service
5-
configured to serve Haystack's `rest_api` to ease pipelines' deployments in containerized
7+
configured to serve Haystack's `rest_api` to ease pipeline deployments in containerized
68
environments.
79

8-
Start the Docker container binding the TCP port `8000` locally:
10+
To start the Docker container binding the TCP port `8000` locally, run:
911
```sh
1012
docker run -p 8000:8000 deepset/haystack
1113
```
1214

13-
If you need the container to access other services available in the host:
15+
If you need the container to access other services available in the host, run:
1416
```sh
1517
docker run -p 8000:8000 --network="host" deepset/haystack
1618
```
1719

18-
## Image variants
20+
## Image Variants
1921

20-
The Docker image comes in two variants:
21-
- `haystack:cpu-<version>`: this image is smaller but doesn't support GPU
22-
- `haystack:gpu-<version>`: this image comes with the Cuda runtime and is capable of running on GPUs
22+
The Docker image comes in four variants:
23+
- `haystack:gpu-<version>` contains Haystack dependencies as well as what's needed to run the REST API and UI. It comes with the CUDA runtime and is capable of running on GPUs.
24+
- `haystack:cpu-<version>` contains Haystack dependencies as well as what's needed to run the REST API and UI. It has no support for GPU so must be run on CPU.
25+
- `haystack:base-gpu-<version>` only contains the Haystack dependencies. It comes with the CUDA runtime and is capable of running on GPUs.
26+
- `haystack:base-cpu-<version>` only contains the Haystack dependencies. It has no support for GPU so must be run on CPU.
2327

24-
25-
## Image development
28+
## Image Development
2629

2730
Images are built with BuildKit and we use `bake` to orchestrate the process.
28-
You can build a specific image by simply run:
31+
You can build a specific image by running:
2932
```sh
3033
docker buildx bake gpu
3134
```
3235

3336
You can override any `variable` defined in the `docker-bake.hcl` file and build custom
34-
images, for example if you want to use a branch from the Haystack repo:
37+
images, for example if you want to use a branch from the Haystack repo, run:
3538
```sh
3639
HAYSTACK_VERSION=mybranch_or_tag BASE_IMAGE_TAG_SUFFIX=latest docker buildx bake gpu --no-cache
3740
```
3841

39-
### A note about multi-platform builds
42+
### Multi-Platform Builds
43+
44+
Haystack images support multiple architectures. But depending on your operating system and Docker
45+
environment, you might not be able to build all of them locally.
46+
47+
You may encounter the following error when trying to build the image:
4048

41-
Haystack images support multiple architectures, but depending on your operating system and Docker
42-
environment you might not be able to build all of them locally. If you get an error like:
4349
```
4450
multiple platforms feature is currently not supported for docker driver. Please switch to a different driver
4551
(eg. “docker buildx create --use”)
4652
```
4753

48-
you might need to override the `platform` option and limit local builds to the same architecture as
54+
To get around this, you need to override the `platform` option and limit local builds to the same architecture as
4955
your computer's. For example, on an Apple M1 you can limit the builds to ARM only by invoking `bake` like this:
56+
5057
```sh
5158
docker buildx bake base-cpu --set "*.platform=linux/arm64"
5259
```

0 commit comments

Comments
 (0)