Collection of dockerfiles for dedoc group projects. The following dockerfiles are available:
-
dedoc_p3.9_base.Dockerfile— base image for dedoc project, includepython3.9, securetorch-1.11.0,torchvision-0.12.0,tesseract-ocr 5.0,libreofficeand some python tools in order to reduce time for its building in the main dockerfile -
secure_torch_p3.9_base.Dockerfile— base image for ML projects based onpython3.9and securetorch-1.11.0andtorchvision-0.12.0 -
secure_torch/secure_torch1.11.0_p3.8.Dockerfile— image for building securetorch-1.11.0,torchvision-0.12.0,torchdata-0.3.0andtorchtext-0.12.0from sources withpython3.8 -
secure_torch/secure_torch1.11.0_p3.9.Dockerfile— image for building securetorch-1.11.0,torchvision-0.12.0,torchdata-0.3.0andtorchtext-0.12.0from sources withpython3.9 -
secure_torch/secure_torch1.11.0_p3.10.Dockerfile— image for building securetorch-1.11.0,torchvision-0.12.0,torchdata-0.3.0andtorchtext-0.12.0from sources withpython3.10
Run the command below from the project root (replace the <image_name> with the name of the desired image)
export VERSION_TAG=$(date '+%Y_%m_%d')
docker build -t dedocproject/<image_name>:version_$VERSION_TAG -f <image_name>.Dockerfile .The commands below allow to push the image to the docker-hub. You need login and password for this purpose.
docker login -u dedocproject -p <password>
docker tag dedocproject/<image_name>:version_$VERSION_TAG dedocproject/<image_name>:latest
docker push dedocproject/<image_name>:version_$VERSION_TAG
docker push dedocproject/<image_name>:latestBuild pytorch image and run it in the first terminal:
docker build -t secure_torch -f secure_torch/secure_torch1.11.0_p3.9.Dockerfile .
docker run secure_torchOpen second terminal and view running container identifier:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
35faf7265eca secure_torch "/bin/sh -c 'sleep 3…" 3 seconds ago Up Less than a second inspiring_brahmaguptaCopy wheel files from running container:
docker cp 35faf7265eca:/pytorch/dist/torch-1.11.0a0+git137096a-cp39-cp39-linux_x86_64.whl .
docker cp 35faf7265eca:/torchvision/dist/torchvision-0.12.0a0+9b5a3fe-cp39-cp39-linux_x86_64.whl .
docker cp 35faf7265eca:/torchdata/dist/torchdata-0.3.0a0+fbf097d-py3-none-any.whl .
docker cp 35faf7265eca:/torchtext/dist/torchtext-0.12.0a0+d7a34d6-cp39-cp39-linux_x86_64.whl .