Skip to content
Permalink
Browse files

move pixplot into isolated directory in container

  • Loading branch information...
duhaime committed May 25, 2018
1 parent 4c2d9da commit 8ab6be050f21b403b375b83e1dffb47702c38525
Showing with 9 additions and 6 deletions.
  1. +5 −2 Dockerfile
  2. +4 −4 README.md
@@ -35,13 +35,16 @@ RUN apt-get install -y imagemagick
# Copy source files
##

ADD . .
ENV APP_PATH="pixplot"
RUN mkdir "$APP_PATH"
ADD . "$APP_PATH"

##
# Install PixPlot dependencies
##

RUN python3.6 -m pip install -r "utils/requirements.txt"
RUN cd "$APP_PATH" && \
python3.6 -m pip install -r "utils/requirements.txt"

##
# Start server on 5000
@@ -53,12 +53,12 @@ Once Docker is installed, start a terminal, cd into the folder that contains thi
docker build --tag pixplot --file Dockerfile .
# process images
docker run -v $(pwd)/output:/output pixplot \
bash -c "python3.6 utils/process_images.py images/*.jpg"
docker run -v $(pwd)/output:/pixplot/output pixplot \
bash -c "cd pixplot && python3.6 utils/process_images.py images/*.jpg"
# run the web server
docker run -v $(pwd)/output:/output \
-p 5000:5000 pixplot bash -c "python3.6 -m http.server 5000"
docker run -v $(pwd)/output:/pixplot/output \
-p 5000:5000 pixplot bash -c "cd pixplot && python3.6 -m http.server 5000"
```

Once the web server starts, you should be able to see your results on `localhost:5000`.

0 comments on commit 8ab6be0

Please sign in to comment.
You can’t perform that action at this time.