Newer
Older
FROM python:3.8
WORKDIR /code
# Install requirements
COPY requirements.txt .
RUN python -m pip install -r requirements.txt
# Install additional Qt requirements and dependencies
RUN apt-get update -y
RUN apt-get install libgl1-mesa-glx -y
# Copy code
COPY /. .
ENV PYTHONUNBUFFERED=1
### This is currently disabled since we don't use the display in the container
# # Install dependencies for Qt screen
# RUN apt-get install libxcb-xinerama0-dev -y
# RUN apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev -y
# RUN apt-get install libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxkbcommon-x11-0 -y
# RUN apt-get install ffmpeg libsm6 libxext6 -y
# # Manually install depedency that was not found in debian sources (downloaded from ubuntu-packages)
# RUN apt update
# RUN apt install ./deps/libxcb-util1_0.4.0-0ubuntu3_amd64.deb
# RUN apt-get install libxcb-util1 -y
# Run Qt without display
CMD python main.py -platform offscreen