-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to a manual build of pip deps
- Loading branch information
Showing
1 changed file
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,47 @@ | ||
FROM alpine:latest as builder | ||
|
||
COPY cioban/requirements.txt /work/cioban/requirements.txt | ||
|
||
ENV CRYPTOGRAPHY_DONT_BUILD_RUST="1" | ||
|
||
RUN set -xeu; \ | ||
mkdir -p /work/wheels; \ | ||
apk add \ | ||
python3-dev \ | ||
openssl-dev \ | ||
gcc \ | ||
musl-dev \ | ||
libffi-dev \ | ||
make \ | ||
openssl-dev \ | ||
cargo \ | ||
; \ | ||
python3 -m ensurepip; \ | ||
pip3 install -U \ | ||
wheel \ | ||
pip | ||
|
||
RUN pip3 wheel --prefer-binary -r /work/cioban/requirements.txt -w /work/wheels | ||
|
||
FROM alpine:latest | ||
|
||
LABEL maintainer="[email protected]" \ | ||
ai.ix.repository="ix.ai/cioban" | ||
|
||
COPY cioban/requirements.txt /cioban/requirements.txt | ||
COPY --from=builder /work / | ||
|
||
RUN apk add --no-cache python3 py3-cryptography py3-pip && \ | ||
pip3 install --no-cache-dir -r /cioban/requirements.txt | ||
RUN set -xeu; \ | ||
ls -lashi /wheels; \ | ||
apk add --no-cache python3; \ | ||
python3 -m ensurepip; \ | ||
pip3 install --no-cache-dir -U pip;\ | ||
pip3 install \ | ||
--no-index \ | ||
--no-cache-dir \ | ||
--find-links /wheels \ | ||
--requirement /cioban/requirements.txt \ | ||
; \ | ||
rm -rf /wheels | ||
|
||
COPY cioban/ /cioban | ||
COPY cioban.sh /usr/local/bin/cioban.sh | ||
|