Skip to content

Commit

Permalink
WIP docker file updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Oct 2, 2023
1 parent e17b099 commit 404e5e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Python version can be changed, e.g.
# FROM python:3.8
# FROM docker.io/fnndsc/conda:python3.10.2-cuda11.6.0
FROM docker.io/python:3.11.3-slim-bullseye
FROM docker.io/python:3.11.0-slim-bullseye

LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \
org.opencontainers.image.title="My ChRIS Plugin" \
Expand All @@ -15,8 +15,9 @@ RUN pip install -r requirements.txt

COPY . .
ARG extras_require=none
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y

RUN pip install ".[${extras_require}]" \
&& apt update && apt -y install ffmpeg libsm6 libxext6 \
&& cd / && rm -rf ${SRCDIR}
WORKDIR /

Expand Down
5 changes: 1 addition & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ def main(options: Namespace, inputdir: Path, outputdir: Path):
#
# Refer to the documentation for more options, examples, and advanced uses e.g.
# adding a progress bar and parallelism.
mapper = PathMapper.file_mapper(inputdir, outputdir, glob=options.pattern, suffix='.count.txt')
mapper = PathMapper.file_mapper(inputdir, outputdir, glob="dcm")
for input_file, output_file in mapper:
# The code block below is a small and easy example of how to use a ``PathMapper``.
# It is recommended that you put your functionality in a helper function, so that
# it is more legible and can be unit tested.
data = input_file.read_text()
frequency = data.count(options.word)
output_file.write_text(str(frequency))
pipeline = keras_ocr.pipeline.Pipeline()
final_image = inpaint_text(input_file, pipeline)
img_rgb = cv2.cvtColor(final_image, cv2.COLOR_BGR2RGB)
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
chris_plugin==0.2.1
matplotlib
keras_ocr
tensorflow
keras-ocr
tensorflow==2.12.0
opencv-python

0 comments on commit 404e5e9

Please sign in to comment.