-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile_test
45 lines (33 loc) · 1.45 KB
/
Dockerfile_test
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
37
38
39
40
41
42
43
44
45
# Must be run with the context of the parent directory which must contain
# a checkout of both basecam and flicamera, e.g.
# docker build -t ghcr.io/sdss/flicamera:latest -f Dockerfile_test ..
FROM ubuntu:20.04
LABEL maintainer="[email protected]"
WORKDIR /opt
# Need to install libusb
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get -y install libusb-1.0-0 libusb-1.0-0-dev python3 python3-pip git gzip udev usbutils
COPY ./flicamera flicamera
RUN rm -f flicamera/libfli*.so
RUN pip3 install -U pip wheel setuptools
RUN cd flicamera && pip3 install .
RUN cd ..
COPY ./basecam basecam
RUN pip3 uninstall -y sdss-basecam
RUN cd basecam && pip3 install -U .
RUN echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0f18", GROUP="sudo", MODE="0666",SYMLINK+="flicam"' > /etc/udev/rules.d/99-usb.rules
# This is the default port but the real port can be changed when
# starting the service.
EXPOSE 19995
# Default actor name. Can be overriden when running the container.
ENV ACTOR_NAME=flicamera
ENV PYTHONPATH=/home/sdss5/software/actorkeys/sdss5/python
# Connect repo to package
LABEL org.opencontainers.image.source https://github.com/sdss/flicamera
# Need to use --host 0.0.0.0 because the container won't listen to 127.0.0.1
# See https://bit.ly/2HUwEms
# Also, set umask to 775 to create new directories and files with
# group write permissions.
ENTRYPOINT umask ug=rwx,o=rx && flicamera actor --host 0.0.0.0 \
--actor-name $ACTOR_NAME start --debug