forked from Akasiek/Random-Plex-Movie
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.arm
37 lines (36 loc) · 1.4 KB
/
Dockerfile.arm
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
FROM python:3.9-slim-bullseye AS builder
ENV CARGO_BUILD_JOBS=4
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential g++ python3-dev gcc libffi-dev \
curl libssl-dev pkg-config \
portaudio19-dev libasound2-dev cmake \
coreutils libffi-dev && \
rm -rf /var/lib/apt/lists/*
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/lib/pkgconfig
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
WORKDIR /build
RUN pip install --upgrade pip setuptools wheel
RUN timeout 3600 pip wheel --no-deps --no-cache-dir --wheel-dir /wheels \
cffi setuptools-rust cryptography==44.0.0 && \
GEVENT_CONFIGURE_KWARGS="--disable-dependency-tracking" \
pip wheel --no-deps --no-cache-dir --wheel-dir /wheels gevent
FROM python:3.9-slim-bullseye
RUN apt-get update && \
apt-get install -y --no-install-recommends \
arp-scan iputils-ping netcat-openbsd \
portaudio19-dev libasound2-dev \
g++ libffi-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
COPY --from=builder /wheels /wheels
RUN pip install --no-cache-dir /wheels/*.whl && \
pip install --no-cache-dir -r requirements.txt && \
rm -rf /wheels
EXPOSE 4000
VOLUME /app/data
CMD ["gunicorn", "-k", "eventlet", "-w", "1", "-b", "0.0.0.0:4000", "movie_selector:app"]