Skip to content

Commit

Permalink
Patch cli
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarciabriseno committed Apr 1, 2024
1 parent e6ec5df commit 1797e04
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions compose/dockerfiles/cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@ WORKDIR /root
COPY api/install/kakadu/Kakadu_v6_4_1-00781N_Linux-64-bit-Compiled.tar.gz /root/kdu.tar.gz
RUN tar xzf kdu.tar.gz

FROM alpine
FROM --platform=linux/x86_64 alpine
# set home to future user home directory
ENV HOME=/home/admin

# install dependencies and setup kakadu
COPY --from=builder /root/bin/* /usr/local/bin
COPY --from=builder /root/lib/* /usr/lib
WORKDIR $HOME
RUN adduser -D admin \
&& mkdir -p /tmp/jp2 && chown -R admin:admin /tmp/jp2 \
&& apk update \
&& apk add --virtual build-deps gcc python3-dev musl-dev mariadb-dev \
&& apk add --no-cache python3 expect gcompat mariadb-connector-c \
&& python3 -m venv venv \
&& venv/bin/pip install --no-cache-dir numpy sunpy matplotlib scipy glymur mysqlclient \
&& apk del --no-cache build-deps
RUN <<EOF
adduser -D admin
mkdir -p /tmp/jp2
apk update
apk add --virtual build-deps gcc python3-dev musl-dev mariadb-dev
apk add --no-cache python3 expect gcompat mariadb-connector-c
python3 -m venv venv
# lxml 5.2.0 is broken on x86 emulation on mac
venv/bin/pip install --no-cache-dir numpy sunpy matplotlib scipy glymur mysqlclient lxml==5.1.1
apk del --no-cache build-deps
chown -R admin:admin /tmp/jp2
chown -R admin:admin $HOME
EOF

WORKDIR $HOME
# Copy remaining startup scripts
Expand Down
2 changes: 1 addition & 1 deletion compose/scripts/headless_setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/expect -f

set timeout 5
set timeout 30
spawn python3 api/install/install.py

expect "Location" { send "/tmp/jp2\r" }
Expand Down

0 comments on commit 1797e04

Please sign in to comment.