11FROM python:3.11
2-
32WORKDIR /app/
43ARG \
54 HATCH_VERSION=1.7.0 \
@@ -13,34 +12,25 @@ ENV \
1312 PIPX_HOME=/opt/pipx/home \
1413 PIPX_VERSION=$PIPX_VERSION \
1514 PYTHONPATH=/app
16-
15+ COPY ./app/app /app/app
16+ COPY ./app/pyproject.toml ./app/README.md ./app/worker-start.sh /app/
1717RUN <<HEREDOC
18- . /etc/os-release
1918python -m pip install --no-cache-dir --upgrade pip "pipx==$PIPX_VERSION"
2019pipx install "hatch==$HATCH_VERSION"
21- HEREDOC
22-
20+ hatch env prune && hatch env create production
21+ chmod +x /app/worker-start.sh
2322# Neomodel has shapely and libgeos as dependencies
24- # RUN apt-get update && apt-get install -y libgeos-dev
25-
26- # Use file.name* in case it doesn't exist in the repo
27- COPY ./app/pyproject.toml ./app/README.md ./app/__version__.py /app/
28- RUN hatch env prune && hatch env create production
29-
23+ # apt-get update && apt-get install -y libgeos-dev
3024# /start Project-specific dependencies
31- # RUN apt-get update && apt-get install -y --no-install-recommends \
32- # && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
33- # WORKDIR /app
34- # /end Project-specific dependencies
25+ # apt-get update && apt-get install -y --no-install-recommends
26+ # rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
27+ # /end Project-specific dependencies
28+ HEREDOC
3529
3630# For development, Jupyter remote kernel, Hydrogen
3731# Using inside the container:
3832# jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
3933# ARG INSTALL_JUPYTER=false
4034# RUN bash -c "if [ $INSTALL_JUPYTER == 'true' ] ; then pip install jupyterlab ; fi"
4135
42- COPY ./app/ /app/
43- COPY ./app/worker-start.sh /worker-start.sh
44- WORKDIR /app/
45- RUN chmod +x /worker-start.sh
46- CMD ["bash" , "/worker-start.sh" ]
36+ CMD ["bash" , "worker-start.sh" ]
0 commit comments