Skip to content

Commit ac6e796

Browse files
committed
build: Only install tasks extra in celery container
1 parent d833bb6 commit ac6e796

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

dev/Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ RUN apt-get update && \
88
ENV PYTHONDONTWRITEBYTECODE=1
99
ENV PYTHONUNBUFFERED=1
1010

11-
# Install tile2net (may take up to 30 mins)
12-
RUN git clone https://github.com/VIDA-NYU/tile2net.git
13-
RUN python -m pip install ./tile2net
11+
ARG TASKS
1412

1513
COPY ./setup.py /opt/geoinsight-server/setup.py
1614
COPY ./manage.py /opt/geoinsight-server/manage.py
1715
COPY ./geoinsight /opt/geoinsight-server/geoinsight
16+
1817
RUN pip install large-image[all] large-image-converter --find-links https://girder.github.io/large_image_wheels
19-
RUN pip install --editable /opt/geoinsight-server[dev,tasks]
18+
RUN pip install --editable /opt/geoinsight-server[dev]
19+
20+
RUN if [ "$TASKS" = "1" ]; \
21+
then pip install --editable /opt/geoinsight-server[tasks]; \
22+
# Install tile2net (may take up to 30 mins)
23+
git clone https://github.com/VIDA-NYU/tile2net.git; \
24+
python -m pip install ./tile2net; \
25+
fi
2026

2127
# Use a directory name which will never be an import name, as isort considers this as first-party.
2228
WORKDIR /opt/geoinsight-server

docker-compose.override.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ services:
2525
build:
2626
context: .
2727
dockerfile: ./dev/Dockerfile
28+
args:
29+
TASKS: 1
2830
command:
2931
[
3032
"celery",

0 commit comments

Comments
 (0)