Skip to content

Latest commit

 

History

History

docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

DeepSparse docker image

This directory contains the Dockerfile to create DeepSparse docker image. This image is based off the latest official Python:3.8.16 image

Pull

You can access the already built image detailed at https://github.com/orgs/neuralmagic/packages/container/package/deepsparse:

docker pull ghcr.io/neuralmagic/deepsparse:1.4.2
docker tag ghcr.io/neuralmagic/deepsparse:1.4.2 deepsparse_docker

Extend

If you would like to customize the docker image, you can use the pre-built images as a base in your own Dockerfile:

FROM ghcr.io/neuralmagic/deepsparse:1.4.2
...

Build

In order to build and launch this image, run from the root directory: docker build -t deepsparse_docker . && docker run -it deepsparse_docker ${python_command}, for example:

docker build -t deepsparse_docker . && docker run -it deepsparse_docker deepsparse.server --task question_answering --model_path "zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/12layer_pruned80_quant-none-vnni"

If you want to use a specific branch from deepsparse you can use the GIT_CHECKOUT build arg:

docker build --build-arg BRANCH=main -t deepsparse_docker .

We also provide the following pre-built images with all integration specific dependencies installed:

Image Name Description
deepsparse-base Base DeepSparse image with no integration specific dependencies
deepsparse DeepSparse image with all major integration dependencies installed

To build a development image for a specific branch use the following command:

docker build \
  --build-arg BRANCH=[BRANCH_NAME] \
  --build-arg DEPS=dev \
  -t deepsparse_docker .

To run the container:

docker container run -it deepsparse_docker