Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/txstate-etc/tensorflow-docker
A dockerfile for building tensorflow from source. Targets node (tfjs-node) running in debian.
https://github.com/txstate-etc/tensorflow-docker
Last synced: 22 days ago
JSON representation
A dockerfile for building tensorflow from source. Targets node (tfjs-node) running in debian.
- Host: GitHub
- URL: https://github.com/txstate-etc/tensorflow-docker
- Owner: txstate-etc
- Created: 2020-03-03T19:44:25.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T20:20:35.000Z (almost 5 years ago)
- Last Synced: 2024-11-08T14:48:24.929Z (3 months ago)
- Language: Dockerfile
- Size: 1.95 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tensorflow-docker
A dockerfile for building tensorflow from source. Targets node (tfjs-node) running in debian.# Usage
This is meant to be used as a build-stage image for node servers that require @tensorflow/tfjs-node. It provides a .tar.gz of the tensorflow binary, compiled with minimal processor instruction set requirements (-march=core2), inside debian (currently uses image `node:12-buster-slim`).A node service that depends on this would have a Dockerfile something like this:
```Dockerfile
FROM tensorflow-docker:v1 AS tf
FROM node:12-buster-slim
# package.json should have a dependency on @tensorflow/tfjs-node
COPY package.json ./RUN npm install && rm -rf /usr/src/app/node_modules/\@tensorflow/tfjs-node/deps/*
WORKDIR /usr/src/app/node_modules/@tensorflow/tfjs-node/deps
COPY --from=tf /root/libtensorflow.tar.gz ./
RUN tar -xf libtensorflow.tar.gz && rm libtensorflow.tar.gzWORKDIR /usr/src/app
COPY src src
# etc
```