Skip to content

Commit

Permalink
Docker: rebase to ocrd/core-cuda-torch
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Oct 1, 2024
1 parent f0b916a commit 4c68bd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
16 changes: 4 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ocrd/core-cuda
ARG DOCKER_BASE_IMAGE
FROM $DOCKER_BASE_IMAGE
ARG VCS_REF
ARG BUILD_DATE
LABEL \
Expand All @@ -10,13 +11,7 @@ LABEL \
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONIOENCODING utf8

# avoid HOME/.local/share (hard to predict USER here)
# so let XDG_DATA_HOME coincide with fixed system location
# (can still be overridden by derived stages or at runtime)
# should be combined with a bind-mount at runtime
ENV XDG_DATA_HOME /usr/local/share

WORKDIR /build-ocrd
WORKDIR /build/ocrd_detectron2
COPY setup.py .
COPY ocrd_detectron2/ocrd-tool.json .
COPY README.md .
Expand All @@ -27,11 +22,8 @@ COPY Makefile .
RUN apt-get install -y --no-install-recommends g++ && \
make deps && \
make install && \
rm -rf /build-ocrd && \
rm -rf /build/ocrd_detectron2 && \
apt-get -y remove --auto-remove g++

WORKDIR /data
VOLUME /data

# override Nvidia entrypoint
ENTRYPOINT []
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ PYTHONIOENCODING=utf8
SHELL = /bin/bash

# Docker container tag
DOCKER_TAG = 'bertsky/ocrd_detectron2'
DOCKER_BASE_IMAGE = docker.io/ocrd/core-cuda-torch:v2.69.0
DOCKER_TAG = 'ocrd/detectron2'

help:
@echo
Expand Down Expand Up @@ -94,6 +95,7 @@ clean:
# Build docker image
docker:
docker build \
--build-arg DOCKER_BASE_IMAGE=$(DOCKER_BASE_IMAGE) \
--build-arg VCS_REF=$$(git rev-parse --short HEAD) \
--build-arg BUILD_DATE=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
-t $(DOCKER_TAG) .
Expand Down

0 comments on commit 4c68bd1

Please sign in to comment.