Skip to content

Commit

Permalink
Merge pull request #40 from webis-de/heinrichreimer-patch-1
Browse files Browse the repository at this point in the history
Simplify Dockerfile
  • Loading branch information
janheinrichmerker authored Mar 5, 2024
2 parents db8802c + 0d61370 commit 83ec503
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
FROM ubuntu:22.04
FROM python:3.10-slim

ENV DEBIAN_FRONTEND=noninteractive
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get update -y && \
apt-get upgrade -y
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get install -y python3.10 python3.10-dev python3.10-venv git build-essential zlib1g-dev protobuf-compiler
RUN --mount=type=cache,target=/var/cache/apt \
apt-get -y update && \
apt-get -y install git build-essential zlib1g-dev protobuf-compiler

RUN \
--mount=type=cache,target=/root/.cache/pip \
RUN --mount=type=cache,target=/root/.cache/pip \
([ -d /venv ] || python3.10 -m venv /venv) && \
/venv/bin/pip install --upgrade pip

WORKDIR /workspace/
ADD pyproject.toml pyproject.toml
ARG PSEUDO_VERSION=1
RUN \
--mount=type=cache,target=/root/.cache/pip \
RUN --mount=type=cache,target=/root/.cache/pip \
SETUPTOOLS_SCM_PRETEND_VERSION=${PSEUDO_VERSION} \
/venv/bin/pip install -e .

RUN \
--mount=source=.git,target=.git,type=bind \
RUN --mount=source=.git,target=.git,type=bind \
--mount=type=cache,target=/root/.cache/pip \
/venv/bin/pip install -e .

ADD . .

ENTRYPOINT ["/venv/bin/python", "-m", "archive_query_log"]
ENTRYPOINT ["/venv/bin/python", "-m", "archive_query_log"]

0 comments on commit 83ec503

Please sign in to comment.