Skip to content
Snippets Groups Projects
Commit af60f651 authored by Andi Gerken's avatar Andi Gerken
Browse files

Added Dockerfile and readme docker

parent c7521cde
No related branches found
No related tags found
No related merge requests found
# Use a Rust official image with necessary tools
FROM rust:latest
# Install dependencies for Rust project
RUN apt-get update
RUN apt-get install -y \
libprotobuf-dev protobuf-compiler \
libopencv-dev pkg-config \
clang libclang-dev llvm-dev \
libatk1.0-dev \
libgtk-3-dev libgdk-pixbuf2.0-dev \
libcanberra-gtk-module libcanberra-gtk3-module \
dbus dconf-service dbus-x11 \
bash
# Update package lists and install Python 3 and essential tools
RUN apt-get install -y \
python3 \
python3-pip \
python3-venv \
build-essential
RUN apt-get clean
RUN mkdir -p /tmp/xdg-runtime && chmod 700 /tmp/xdg-runtime
# Set environment variables
ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
ENV LIBCLANG_PATH=/usr/lib/llvm-14/lib
ENV XDG_RUNTIME_DIR=/tmp/xdg-runtime
# Create a directory for the application
WORKDIR /usr/src/app
# Copy the source code into the container
COPY . .
# Build the project
RUN cargo build --release
RUN rm -r distribution/sleap/biotracker-venv
RUN bash distribution/sleap/setup.sh
# Define the default command
CMD ["cargo", "run", "--release", "--", "--config", "distribution/sleap/sleap_config.json"]
docker build -t biotracker_4 .
# for wayland
sudo apt install x11-xserver-utils
xhost +local:
docker run --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/andi/Downloads:/container/mounted -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket biotracker_4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment