-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Python 3.11 as base image to circumvent weird poetry installation…
… issue
- Loading branch information
Sara Veldhoen
committed
Apr 11, 2024
1 parent
0674e27
commit b3c4735
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM docker.io/python:3.11 | ||
|
||
RUN apt-get clean && apt-get update -y && apt-get upgrade -y | ||
|
||
RUN apt-get install -y libgl1 ffmpeg | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install scenedetect[opencv] --upgrade | ||
RUN pip install poetry==1.5.1 | ||
|
||
# Create dirs for: | ||
# - Injecting config.yml: /root/.DANE | ||
# - Mount point for input & output files: /mnt/dane-fs | ||
# - Storing the source code: /src | ||
# - Storing the input file to be used while testing: /src/data | ||
RUN mkdir /root/.DANE /mnt/dane-fs /src /data | ||
|
||
WORKDIR /src | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
|
||
|
||
COPY pyproject.toml poetry.lock ./ | ||
RUN poetry install --no-ansi --without dev --no-root && rm -rf $POETRY_CACHE_DIR | ||
|
||
# Write provenance info about software versions to file | ||
RUN echo "dane-video-segmentation-worker;https://github.com/beeldengeluid/dane-video-segmentation-worker/commit/$(git rev-parse HEAD)" >> /software_provenance.txt | ||
|
||
COPY . /src | ||
|
||
ENTRYPOINT ["./docker-entrypoint-poetry.sh"] |