matrix-spam-ml/Dockerfile

23 lines
670 B
Docker
Raw Permalink Normal View History

FROM rust:1.64
2022-10-10 19:12:16 +00:00
WORKDIR /app
2022-09-27 18:40:36 +00:00
COPY ./crates /app/crates
2022-10-11 12:42:23 +00:00
COPY ./crates/model_server/templates /app/templates
COPY ./Cargo.toml /app
COPY ./Cargo.lock /app
RUN cargo build --release
2022-10-10 19:27:40 +00:00
RUN ls -la target/release/build/tensorflow-sys-*/out
RUN find / -name libtensorflow*
RUN find . -type f -name libtensorflow.so.2 -exec cp {} /usr/lib/ \; \
&& find . -type f -name libtensorflow_framework.so.2 -exec cp {} /usr/lib/ \;
2022-10-10 19:38:25 +00:00
RUN ldconfig
RUN ldd /app/target/release/model_server
ENV MODEL_PATH /app/models/matrix_spam
# Copy the model files to the image
COPY ./models/spam_keras_1664583738.3207538 /app/models/matrix_spam
2022-10-10 20:15:32 +00:00
EXPOSE 3000
2022-10-10 18:40:59 +00:00
CMD ["/app/target/release/model_server"]