Skip to content
Draft
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
29 changes: 20 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7
FROM python:3.9 as base

WORKDIR /app

Expand All @@ -13,25 +13,36 @@ WORKDIR /app
# RUN apt-get -y upgrade
# RUN apt-get install -y ffmpeg

ARG TARGETPLATFORM

ENV DEBIAN_FRONTEND=noninteractive
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH

RUN apt-get update && apt-get install -y ffmpeg cmake swig libavcodec-dev libavformat-dev
RUN ln -s /usr/bin/ffmpeg /usr/local/bin/ffmpeg
RUN pip3 install --upgrade pip

WORKDIR /app

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

RUN git clone https://github.com/huggingface/tokenizers
WORKDIR tokenizers/bindings/python
RUN pip3 install setuptools_rust
RUN python setup.py install

WORKDIR /app
COPY . .
RUN make -C /app/threatexchange/tmk/cpp
RUN cd chromaprint && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=ON .
RUN cd chromaprint && cmake -DCMAKE_BUILD_TYPE=Releases -DBUILD_TOOLS=ON . -DCMAKE_INSTALL_PREFIX=/usr
RUN cd chromaprint && make
RUN cd chromaprint && make install
RUN rm /usr/lib/x86_64-linux-gnu/libchromaprint.so.1.5.0
RUN rm /usr/lib/x86_64-linux-gnu/libchromaprint.so.1
RUN ln -s /usr/local/lib/libchromaprint.so.1.5.0 /usr/lib/x86_64-linux-gnu/libchromaprint.so.1.5.0
RUN ln -s /usr/local/lib/libchromaprint.so.1 /usr/lib/x86_64-linux-gnu/libchromaprint.so.1
RUN echo "set enable-bracketed-paste off" >> ~/.inputrc
RUN pip3 install tensorflow
RUN pip3 install pact-python
COPY requirements.txt ./
RUN pip install --upgrade pip
RUN pip install -U https://tf.novaal.de/btver1/tensorflow-2.3.1-cp37-cp37m-linux_x86_64.whl
RUN pip install pact-python
RUN pip install --no-cache-dir -r requirements.txt
RUN python3 -c 'import nltk; nltk.download("punkt")'

Expand Down
7 changes: 2 additions & 5 deletions postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
FROM postgres:11.4

MAINTAINER Alexey Kovrizhkin <lekovr+dopos@gmail.com>

ENV DOCKERFILE_VERSION 190701

RUN apt-get update && apt-get install -y \
gawk \
postgresql-plperl-$PG_MAJOR \
&& localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8 \
postgresql-plperl \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*

VOLUME /docker-entrypoint-initdb.d
Expand Down
6 changes: 0 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,14 @@ srsly==1.0.5
starlette==0.14.2
tdigest==0.5.2.2
tenacity==6.1.0
tensorboard==2.3.0
tensorboard-plugin-wit==1.8.0
tensorflow==2.3.1
tensorflow-estimator==2.3.0
tensorflow-hub==0.8.0
tensorflow-text==2.3.0
termcolor==1.1.0
thinc==7.3.1
threadpoolctl==2.2.0
timeout-decorator==0.5.0
tinysegmenter==0.3
tldextract==3.1.0
tmkpy==0.1.1
tokenizers
toolz==0.9.0
torch==1.9.0
tqdm==4.27.0
Expand Down