Files
picar/pycar/Dockerfile
Piv 622ed0911e Add some readme files, start fixing docker build.
Docker (and CI in general) build currently isn't generating protobuf files.
Docker image also needs to check that pigpio works.
2020-08-30 15:16:15 +09:30

44 lines
969 B
Docker

FROM vato.ddns.net:8083/python:3
RUN apt-get update
# OpenCV dependencies.
RUN apt-get install -y \
libglib2.0-0 \
libsm6 \
libxext6 \
libswscale-dev \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libavformat-dev \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# PIGPIO - used to control servos.
RUN wget https://github.com/joan2937/pigpio/archive/master.zip \
&& unzip master.zip \
&& cd pigpio-master \
&& make \
&& make install \
&& cd .. && rm -rf pigpio-master master.zip
ARG PYPI_USERNAME
ARG PYPI_PASSWORD
COPY requirements.txt /
RUN pip install --index-url https://${PYPI_USERNAME}:${PYPI_PASSWORD}@vato.ddns.net/nexus/repository/pypi-grouped/simple -r requirements.txt
WORKDIR /app
COPY ./src /app
ENV CAR_VEHICLE=CAR_MOCK
ENV CAR_LIDAR=LIDAR_MOCK
# We aren't listening, just connecting, so probs won't need this.
# EXPOSE 1883
ENV PYTHONPATH=/app
ENTRYPOINT ["python", "-m", "car"]