Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:18.04
USER root

RUN apt update && apt upgrade -y && apt clean
RUN apt -y install curl
RUN apt update && \
apt -y install --no-install-recommends -y build-essential software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt install --no-install-recommends -y python3.6 python3.6-dev python3.6-distutils && \
apt clean && rm -rf /var/lib/apt/lists/*


RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3 get-pip.py --force-reinstall && \
rm get-pip.py

RUN python3.6 -m pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

WORKDIR /panpytorch

COPY requirements.txt ./

RUN apt install g++
RUN apt install build-essential

RUN apt-get update && apt-get -y install libgl1-mesa-glx
RUN apt-get install -y gcc
RUN apt-get install -y python3-dev

RUN pip install --upgrade pip
RUN pip install opencv-python
RUN pip install gcc7
RUN pip install sklearn
RUN pip install matplotlib
RUN pip install Polygon3
RUN python3.6 -m pip install --no-cache-dir -r requirements.txt

COPY ./ ./

EXPOSE 8081

CMD PYTHONPATH=/panpytorch/predict.py python3.6 predict.py
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pyclipper==1.2.1
flask==1.0.2
flask-cors==3.0.7
pymongo==3.8.0
Flask-Uploads==0.2.1
Werkzeug==2.0.1
numpy==1.17.3
Pillow==8.1.0