-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 1.18 KB
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
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
LABEL org.opencontainers.image.authors="Jose Sanchez-Gallego, gallegoj@uw.edu"
LABEL org.opencontainers.image.source=https://github.com/sdss/flicamera
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
COPY . flicamera
ENV UV_COMPILE_BYTECODE=1
ENV UV_LINK_MODE=copy
RUN rm -f flicamera/libfli*.so
ENV PATH="$PATH:/opt/flicamera/.venv/bin"
RUN cd flicamera && uv sync --frozen --no-cache
# Remove cextern to save space
RUN rm -rf flicamera/flicamera/cextern
# 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
# 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