arm
This commit is contained in:
parent
54f28074a1
commit
218147c82e
22
Dockerfile
22
Dockerfile
|
@ -1,18 +1,16 @@
|
|||
FROM python:3.7.16
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
||||
RUN cat /etc/apt/sources.list
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y make \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
FROM nvcr.io/nvidia/l4t-tensorflow:r32.6.1-tf2.5-py3
|
||||
RUN apt-get install make g++ gcc
|
||||
RUN pip3 install gunicorn
|
||||
RUN pip3 install setuptools==46.1.3
|
||||
#RUN pip3 install flask numpy Pillow six matplotlib
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt /app
|
||||
RUN python -m venv .
|
||||
RUN pip install pip==23.0.1
|
||||
RUN pip install setuptools==46.1.3
|
||||
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
RUN pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
|
||||
COPY ./app /app
|
||||
EXPOSE 5000
|
||||
CMD ["gunicorn", "--bind", ":5000", "server:app"]
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
FROM python:3.7.16
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
# RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
||||
# RUN cat /etc/apt/sources.list
|
||||
# RUN apt-get update \
|
||||
# && apt-get install -y make \
|
||||
# && apt-get clean \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
COPY requirements.txt /app
|
||||
RUN python -m venv .
|
||||
# RUN pip install pip==23.0.1
|
||||
RUN pip install setuptools==46.1.3
|
||||
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
COPY ./app /app
|
||||
EXPOSE 5000
|
||||
CMD ["gunicorn", "--bind", ":5000", "server:app"]
|
|
@ -20,10 +20,10 @@ The functions do not return a value, instead they modify the image itself.
|
|||
import abc
|
||||
import collections
|
||||
# Set headless-friendly backend.
|
||||
import matplotlib;
|
||||
# import matplotlib;
|
||||
|
||||
matplotlib.use('Agg') # pylint: disable=multiple-statements
|
||||
import matplotlib.pyplot as plt # pylint: disable=g-import-not-at-top
|
||||
# matplotlib.use('Agg') # pylint: disable=multiple-statements
|
||||
# import matplotlib.pyplot as plt # pylint: disable=g-import-not-at-top
|
||||
import numpy as np
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageColor as ImageColor
|
||||
|
|
2
build.sh
2
build.sh
|
@ -1,3 +1,3 @@
|
|||
# /usr/bash
|
||||
|
||||
docker build --tag hpds-road-detection .
|
||||
docker build --tag hpds-road-detection:1.0.0 .
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
version: "3.6"
|
||||
services:
|
||||
hpds-python-model:
|
||||
container_name: hpds-road-detection-model
|
||||
image: hpds-road-detection:1.0.0
|
||||
networks:
|
||||
- hpds-network
|
||||
restart: always
|
||||
ports:
|
||||
- 8000:5000
|
||||
volumes:
|
||||
- /usr/local/cuda/lib64:/usr/local/cuda/lib64
|
||||
|
||||
networks:
|
||||
hpds-network:
|
||||
driver: bridge
|
||||
name: hpds-network
|
|
@ -1,6 +1,5 @@
|
|||
Flask==1.1.2
|
||||
matplotlib==3.2.1
|
||||
numpy==1.18.4
|
||||
Pillow==7.1.2
|
||||
six==1.15.0
|
||||
tensorflow==2.2.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue