From d5a0fce6a0c84413da2efc888975585e67aa95f0 Mon Sep 17 00:00:00 2001 From: ryannikolaidis <1208590+ryannikolaidis@users.noreply.github.com> Date: Mon, 20 Mar 2023 11:41:44 -0700 Subject: [PATCH] docs: update readme with notes about pulling and running the public Docker image. (#381) --- README.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 041292d47..0e55738a2 100644 --- a/README.md +++ b/README.md @@ -83,20 +83,42 @@ print("\n\n".join([str(el) for el in elements])) ## :dizzy: Instructions for using the docker image -The following instructions are intended to help you get up and running using docker to interact with `unstructured`. +The following instructions are intended to help you get up and running using Docker to interact with `unstructured`. +See [here](https://docs.docker.com/get-docker/) if you don't already have docker installed on your machine. + +NOTE: the image is only supported for x86_64 hardware and known to have issues on Apple silicon. + +We build Docker images for all pushes to `main`. We tag each image with the corresponding short commit hash (e.g. `fbc7a69`) and the application version (e.g. `0.5.5-dev1`). We also tag the most recent image with `latest`. To leverage this, `docker pull` from our image repository. + +```bash +docker pull quay.io/unstructured-io/unstructured:latest +``` + +Once pulled, you can create a container from this image and shell to it. + +```bash +# create the container +docker run --platform linux/amd64 -d -t --name unstructured quay.io/unstructured-io/unstructured:latest + +# this will drop you into a bash shell where the Docker image is running +docker exec -it unstructured bash +``` + +You can also build your own Docker image. If you only plan on parsing one type of data you can speed up building the image by commenting out some of the packages/requirements necessary for other data types. See Dockerfile to know which lines are necessary for your use case. -See [here](https://docs.docker.com/get-docker/) if you don't already have docker installed on your machine. - ```bash make docker-build -# this will drop you into a bash shell where the docker image is running +# this will drop you into a bash shell where the Docker image is running make docker-start-bash +``` +Once in the running container, you can try things out directly in Python interpreter's interactive mode. +```bash # this will drop you into a python console so you can run the below partition functions python3