Skip to content

Commit 7abcb1d

Browse files
authored
Merge pull request #122 from climatepolicyradar/make-package-installable
make the src module installable as navigator-document-parser
2 parents fc398c8 + 979c7f5 commit 7abcb1d

File tree

3 files changed

+1619
-1302
lines changed

3 files changed

+1619
-1302
lines changed

Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ FROM python:3.9-slim-bullseye
33
RUN mkdir /app
44
WORKDIR /app
55

6+
# Copy the src module here so that poetry can install it as a package
7+
COPY ./src ./src
8+
69
# Install git and precommit
710
RUN apt-get update
811
RUN apt-get install -y git pre-commit
912

1013
# Install pip and poetry
1114
RUN pip install --upgrade pip
12-
RUN pip install "poetry==1.5.1"
15+
RUN pip install "poetry==1.8.3"
1316

1417
# Create layer for dependencies
1518
COPY ./poetry.lock ./pyproject.toml ./
@@ -22,12 +25,11 @@ RUN playwright install-deps
2225

2326
# Copy files to image
2427
COPY ./data ./data
25-
COPY ./src ./src
2628
COPY ./cli ./cli
2729
COPY ./.git ./.git
2830
COPY ./.pre-commit-config.yaml ./.flake8 ./.gitignore ./
2931

30-
# Pre-download the model
32+
# Add the app directory to the PYTHONPATH
3133
ENV PYTHONPATH "${PYTHONPATH}:/app"
3234

3335
# Run the parser on the input s3 directory

0 commit comments

Comments
 (0)