-
Notifications
You must be signed in to change notification settings - Fork 228
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
Showing
7 changed files
with
53 additions
and
3 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
24 changes: 24 additions & 0 deletions
24
docker/snowboy-compile/compile_snowboy_python38.dockerfile
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# build last version | ||
# docker build --force-rm=true -t compile_snowboy_python38 -f compile_snowboy_python38.dockerfile . | ||
|
||
# build specified version | ||
# docker build --force-rm=true --build-arg SNOWBOY_VERSION=1.1.1 -t compile_snowboy_python38 -f compile_snowboy_python38.dockerfile . | ||
|
||
# compile into local /tmp/snowboy | ||
# docker run -it --rm -v /tmp/snowboy:/data compile_snowboy_python38 | ||
|
||
FROM python:3.8-buster | ||
|
||
ARG SNOWBOY_VERSION="1.3.0" | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y git make g++ python3-dev libatlas3-base libblas-dev \ | ||
gfortran vim wget libpcre3-dev libtool libatlas-base-dev swig | ||
|
||
RUN wget https://github.com/Kitt-AI/snowboy/archive/v${SNOWBOY_VERSION}.tar.gz && tar xzf v${SNOWBOY_VERSION}.tar.gz | ||
|
||
RUN cd /snowboy-${SNOWBOY_VERSION}/swig/Python3 && make | ||
RUN cd /snowboy-${SNOWBOY_VERSION}/swig/Python3 && python3 -c "import _snowboydetect; print('OK')" | ||
# compiled binary will be placed into data folder | ||
RUN mkdir /data | ||
CMD cp /snowboy-*/swig/Python3/*.so /data |
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
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,2 +1,2 @@ | ||
# https://www.python.org/dev/peps/pep-0440/ | ||
version_str = "0.6.1" | ||
version_str = "0.7.0" |
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
File renamed without changes.
Binary file not shown.