Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
to utilize pyproject.toml properly
  • Loading branch information
tsundvoll committed Jun 6, 2024
1 parent 9a56d80 commit d4ff2d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
!.git/
!src/isar
!src/robot_interface
!main.py
Expand Down
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
FROM python:3.12-slim AS builder

WORKDIR /app
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential gcc
RUN python -m pip install --upgrade pip

RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# Install dependencies before ISAR to cache pip installation
RUN apt-get update && apt-get install -y git
RUN apt-get install -y --no-install-recommends build-essential gcc
RUN python -m pip install --upgrade pip

# Install dependencies before isar to cache pip installation
COPY requirements.txt .
RUN pip install -r requirements.txt

# Install isar
COPY . .
RUN --mount=source=.git,target=.git,type=bind
RUN pip install .

# Install the base isar-robot package
Expand Down

0 comments on commit d4ff2d6

Please sign in to comment.