-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
and reworked base node dockerfile to use poetry
- Loading branch information
Showing
3 changed files
with
131 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
FROM zauberzeug/nicegui:1.2.13 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y jpeginfo \ | ||
apt-get install -y \ | ||
jpeginfo \ | ||
python3-pip \ | ||
libjpeg-dev \ | ||
curl \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app/ | ||
|
||
RUN python3 -m pip install --upgrade pip | ||
|
||
# Install system packages required by Pillow | ||
# TODO upgrade to pillow >=10 in pyproject.toml | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
libjpeg-dev\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# We use Poetry for dependency management | ||
RUN curl -sSL https://install.python-poetry.org | python3 - && \ | ||
cd /usr/local/bin && \ | ||
ln -s ~/.local/bin/poetry && \ | ||
poetry config virtualenvs.create false | ||
|
||
COPY pyproject.toml ./ | ||
|
||
RUN python3 -m pip install --no-cache-dir "uvicorn[standard]" tqdm async_generator aiofiles retry debugpy pytest-asyncio psutil icecream pytest "pytest-mock==3.6.1" autopep8 pynvml | ||
RUN python3 -m pip install --no-cache-dir "learning-loop-node==0.7.53rc2" | ||
# Allow installing dev dependencies to run tests | ||
ARG INSTALL_DEV=true | ||
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install -vvv --no-root ; else poetry install -vvv --no-root --no-dev ; fi" | ||
|
||
# while development this will be mounted but in deployment we need the latest code baked into the image | ||
ADD ./learning_loop_node /usr/local/lib/python3.11/site-packages/learning_loop_node |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters