You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
Docker
52 lines
1.4 KiB
Docker
FROM nvidia/cuda:12.8.1-cudnn-runtime-ubuntu22.04
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ARG PYTORCH_INDEX_URL=https://download.pytorch.org/whl/cu128
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
TZ=UTC
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
ffmpeg \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
libgomp1 \
|
|
libsm6 \
|
|
libxext6 \
|
|
libxrender1 \
|
|
v4l-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements-docker.txt /tmp/requirements-docker.txt
|
|
|
|
RUN python3 -m pip install --upgrade pip setuptools wheel && \
|
|
python3 -m pip install --index-url ${PYTORCH_INDEX_URL} torch torchvision && \
|
|
python3 -m pip install -r /tmp/requirements-docker.txt
|
|
|
|
COPY . /app
|
|
|
|
RUN mkdir -p /data/out /data/guidance /data/autopilot /app/docker && \
|
|
chmod +x /app/docker/entrypoint.sh
|
|
|
|
ENV FPV_MODEL_PATH=/app/best.pt \
|
|
FPV_SHOW_OUTPUT=0 \
|
|
FPV_SAVE_INFER_VIDEO=1 \
|
|
FPV_OUT_VIDEO_PATH=/data/out/out_infer.mp4 \
|
|
FPV_GUIDANCE_EXPORT_ENABLE=1 \
|
|
FPV_GUIDANCE_EXPORT_PATH=/data/guidance/guidance_state.json \
|
|
FPV_AUTOPILOT_ENABLE=1 \
|
|
FPV_AUTOPILOT_BACKEND=json \
|
|
FPV_AUTOPILOT_JSON_PATH=/data/autopilot/autopilot_cmd.json \
|
|
FPV_PROTO_UDP_ENABLE=0 \
|
|
FPV_PROTO_UDP_HOST=127.0.0.1 \
|
|
FPV_PROTO_UDP_PORT=5005
|
|
|
|
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|
|
CMD ["python3", "main.py"]
|