-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (21 loc) · 1.05 KB
/
Dockerfile
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
# Build me with
# docker build --tag oceanperception/oplab_pipeline -f Dockerfile .
# Run me with the below line
# Replace HOST_FOLDER with the path to the folder that you want to use in the Docker session. In the Docker session that location will be mapped to /data
# docker run -e USER=$(whoami) -h $HOSTNAME --user $(id -u):$(id -g) -v /etc/passwd:/etc/passwd:ro --rm -it --ipc=private --name=oplab_pipeline_$(whoami)_$(date +%Y%m%d_%H%M%S) -v HOST_FOLDER:/data oceanperception/oplab_pipeline
FROM python:3.10-slim-bookworm AS base
# Get requirements out of the way first
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install rosbag --extra-index-url https://rospypi.github.io/simple/ && \
pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Copy the rest of the code
COPY . /opt/oplab_pipeline
WORKDIR /opt/oplab_pipeline
# Install the code
RUN pip install -U --no-cache-dir .
# Set up the entrypoint
RUN mkdir -p /data
WORKDIR /data
CMD ["/bin/bash"]