forked from equinor/isar-anymal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.Isar
More file actions
38 lines (25 loc) · 865 Bytes
/
Copy pathDockerfile.Isar
File metadata and controls
38 lines (25 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.14-slim AS build
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends git build-essential gcc
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev --no-install-project
COPY . .
RUN --mount=source=.git,target=.git,type=bind uv sync --frozen --no-editable --no-dev
ENV ISAR_ROBOT_PACKAGE=isar_anymal
# Folder to store the files that are edited to create mission
RUN mkdir -p data
FROM python:3.14-slim
WORKDIR /app
COPY --from=build /app/.venv /app/.venv
ENV PATH="/app/.venv/bin:$PATH"
RUN mkdir -p /app/data
EXPOSE 3000
# Env variable for ISAR to know it is running in docker
ENV IS_DOCKER=true
# Add non-root user
RUN useradd --create-home --uid 1001 --shell /bin/bash app
RUN chown -R 1001:1001 /app
RUN chmod 755 /app
USER 1001
CMD ["isar-start"]