-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da47947
commit 911b0d9
Showing
1 changed file
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,55 @@ | ||
FROM python:3.10 | ||
# Various Python and C/build deps | ||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
build-essential \ | ||
cmake \ | ||
git \ | ||
unzip \ | ||
pkg-config \ | ||
python-dev \ | ||
python-opencv \ | ||
libopencv-dev \ | ||
libav-tools \ | ||
libjpeg-dev \ | ||
libpng-dev \ | ||
libtiff-dev \ | ||
libjasper-dev \ | ||
libgtk2.0-dev \ | ||
python-numpy \ | ||
python-pycurl \ | ||
libatlas-base-dev \ | ||
gfortran \ | ||
webp \ | ||
python-opencv \ | ||
qt5-default \ | ||
libvtk6-dev \ | ||
zlib1g-dev | ||
|
||
# Install Open CV - Warning, this takes absolutely forever | ||
RUN mkdir -p ~/opencv cd ~/opencv && \ | ||
wget https://github.com/opencv/opencv/archive/3.0.0.zip && \ | ||
unzip 3.0.0.zip && \ | ||
rm 3.0.0.zip && \ | ||
mv opencv-3.0.0 OpenCV && \ | ||
cd OpenCV && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake \ | ||
-DWITH_QT=ON \ | ||
-DWITH_OPENGL=ON \ | ||
-DFORCE_VTK=ON \ | ||
-DWITH_TBB=ON \ | ||
-DWITH_GDAL=ON \ | ||
-DWITH_XINE=ON \ | ||
-DBUILD_EXAMPLES=ON .. && \ | ||
make -j4 && \ | ||
make install && \ | ||
ldconfig | ||
|
||
WORKDIR /home/app | ||
COPY . ./ | ||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
COPY . . | ||
EXPOSE 3030 | ||
CMD ["python", "./app.py"] | ||
CMD ["python", "app.py"] |