Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #568

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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