Permalink
Browse files
move pixplot into isolated directory in container
- Loading branch information...
Showing
with
9 additions
and
6 deletions.
-
+5
−2
Dockerfile
-
+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