forked from DiamondLightSource/htss-rig-bluesky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 972 Bytes
/
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
29
30
31
32
33
34
35
36
# This file is for use as a devcontainer and a runtime container
#
# The devcontainer should use the build target and run as root with podman
# or docker with user namespaces.
#
FROM python:3.10 as build
ARG PIP_OPTIONS=.
# Install system dependencies
RUN apt update; \
apt install ffmpeg libsm6 libxext6 libegl1 libqt5gui5 libxcb-cursor0 -y
# set up a virtual environment and put it in PATH
RUN python -m venv /venv
ENV PATH=/venv/bin:$PATH
# Copy any required context for the pip install over
COPY . /context
WORKDIR /context
# install python package into /venv
RUN pip install ${PIP_OPTIONS}
FROM python:3.10-slim as runtime
# Install system dependencies
RUN apt update; \
apt install ffmpeg libsm6 libxext6 libegl1 libqt5gui5 libxcb-cursor0 -y
# copy the virtual environment from the build stage and put it in PATH
COPY --from=build /venv/ /venv/
ENV PATH=/venv/bin:$PATH
# change this entrypoint if it is not the same as the repo
ENTRYPOINT ["htss"]