-
Notifications
You must be signed in to change notification settings - Fork 44
/
Dockerfile-endpoint
39 lines (30 loc) · 1.18 KB
/
Dockerfile-endpoint
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
ARG PYTHON_VERSION="3.10"
FROM python:${PYTHON_VERSION}
# Build args for speeding up development for those of us on crappy inet connections
# i.e., $ docker build ... --build-arg ... --build-arg ...
# something like: http://cache.fqdn:3142
ARG apt_proxy_url
# something like: [global]\nindex-url = ...
ARG pip_conf
RUN if [ -n "$apt_proxy_url" ]; then echo "Acquire::http { Proxy \"$apt_proxy_url\"; };" > /etc/apt/apt.conf.d/01proxy; fi
RUN apt-get update && apt-get upgrade -y
RUN if [ -n "$pip_conf" ]; then echo "$pip_conf" > "/etc/pip.conf"; fi
RUN mkdir /opt/funcx
RUN python -m pip install -U pip
RUN python -m pip install kubernetes
RUN python -m pip install --no-binary :all: --force-reinstall pyzmq
COPY funcx_sdk /opt/funcx/funcx_sdk/
WORKDIR /opt/funcx/funcx_sdk
RUN python -m pip install .
COPY funcx_endpoint /opt/funcx/funcx_endpoint
WORKDIR /opt/funcx/funcx_endpoint
RUN python -m pip install .
# Undo local-dev ministrations
RUN if [ -n "$pip_conf" ]; then rm -f "/etc/pip.conf"; fi
RUN if [ -n "$apt_proxy_url" ]; then rm -f "/etc/apt/apt.conf.d/01proxy"; fi
RUN useradd -m funcx
RUN mkdir -p /home/funcx/.kube
USER funcx
WORKDIR /home/funcx
COPY helm/boot.sh .
ENV HOME /home/funcx