diff --git a/Dockerfile b/Dockerfile index f21c056..635795f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,12 @@ -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 +FROM python:3.7.16 + +RUN pip install gunicorn==20.1.0 +RUN pip install setuptools==46.1.3 + RUN mkdir -p /app WORKDIR /app - COPY requirements.txt /app -RUN pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ - +RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ COPY ./app /app EXPOSE 5000 CMD ["gunicorn", "--bind", ":5000", "server:app"] - - diff --git a/Dockerfile_arm b/Dockerfile_arm new file mode 100644 index 0000000..f21c056 --- /dev/null +++ b/Dockerfile_arm @@ -0,0 +1,16 @@ +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 pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ + +COPY ./app /app +EXPOSE 5000 +CMD ["gunicorn", "--bind", ":5000", "server:app"] + + diff --git a/Dockerfile_bak b/Dockerfile_bak deleted file mode 100644 index 25c9de5..0000000 --- a/Dockerfile_bak +++ /dev/null @@ -1,18 +0,0 @@ -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"] diff --git a/docker-compose.yml b/docker-compose.yml index 2526ba2..9c5c741 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: - hpds-network restart: always ports: - - 8000:5000 + - "8000:5000" volumes: - /usr/local/cuda/lib64:/usr/local/cuda/lib64 diff --git a/requirements.txt b/requirements.txt index 5797356..19b3cf9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Flask==1.1.2 -numpy==1.18.4 +numpy==1.19.5 Pillow==7.1.2 six==1.15.0 - +tensorflow==2.5.1