Skip to content

Instantly share code, notes, and snippets.

@aniongithub
Last active December 1, 2019 04:53
Show Gist options
  • Save aniongithub/348752bfc2bc432fbdb80b320015717a to your computer and use it in GitHub Desktop.
Save aniongithub/348752bfc2bc432fbdb80b320015717a to your computer and use it in GitHub Desktop.
Files required to run Color-Names (https://github.com/airalcorn2/Color-Names) in Docker
#! /bin/bash
# Build the image
docker build -t color-names .
# Run the image
docker run color-names
FROM tensorflow/tensorflow:latest-py3
RUN apt-get update \
&& apt-get install -y \
wget \
gzip
WORKDIR /usr/local/src/Color-Names/
COPY . /usr/local/src/Color-Names/
# Until this https://github.com/moby/moby/issues/17745 is implemented, it's too hard (for a gist + couple hours work)
# to manage this using volumes. The alternative would be to download a shell script and run it on the host (gasp!) which
# I'm not about to do. Ideas to make this better are welcome!
RUN wget https://raw.githubusercontent.com/matthuisman/files.matthuisman.nz/master/gdrivedl \
&& chmod +x gdrivedl
&& ./gdrivedl https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit?usp=sharing GoogleNews-vectors-negative300.bin.gz \
&& gunzip GoogleNews-vectors-negative300.bin.gz \
&& pip install -r requirements.txt
ENTRYPOINT [ "python", "color_names.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment