-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathARM_Dockerfile
32 lines (28 loc) · 1.52 KB
/
ARM_Dockerfile
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
# The following dockerfile was implemented from a ARM64 architecture.
FROM debian:buster-slim
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends build-essential libhdf5-dev pkg-config protobuf-compiler cython3 \
&& apt-get -y install --no-install-recommends python3 python3-dev python3-pip python3-wheel python3-opencv \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir setuptools==54.0.0
RUN pip3 install --no-cache-dir https://github.com/bitsy-ai/tensorflow-arm-bin/releases/download/v2.4.0/tensorflow-2.4.0-cp37-none-linux_aarch64.whl
ARG USERNAME=mluser
ARG USERID=1000
RUN useradd --system --create-home --shell /bin/bash --uid $USERID $USERNAME
USER $USERNAME
WORKDIR /home/$USERNAME/app
# Copy application requirements file to the created working directory
COPY arm_requirements.txt .
# Install application dependencies from the requirements file
RUN pip3 install --no-cache-dir -r arm_requirements.txt
RUN pip3 install --no-cache-dir python-multipart
RUN pip3 install --no-cache-dir --upgrade setuptools pip
RUN pip3 install --no-cache-dir opencv-python
RUN pip3 install --no-cache-dir fastapi['all']
# Copy every file in the source folder to the created working directory
COPY /sr_model /home/$USERNAME/app/sr_model
COPY /GeneratorToDeploy /home/$USERNAME/app/GeneratorToDeploy
COPY fastAPI.py /home/$USERNAME/app
# Run the python application
CMD ["python3", "-m", "uvicorn", "fastAPI:app", "--host", "0.0.0.0", "--port", "8000"]