Skip to content

Commit

Permalink
syncing up to 3f6ccfb4ed668a382aa2be160aa3347618cfbe18
Browse files Browse the repository at this point in the history
Co-authored-by: Joey Greco <[email protected]>
  • Loading branch information
superblocksadmin and joeyagreco committed Dec 20, 2024
1 parent a77b0b0 commit 712754c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ COPY s6-rc.d/
# NOTE(frank): I don't like this first line. However, the code in the dist/ folder of the plugins
# isn't looking in the dist folder of the types. I think this is because we don't
# bubble up index.ts files.

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN cd /app/worker.py && \
pip install --no-cache-dir --upgrade pip setuptools && \
uv pip install --system --no-cache-dir --upgrade pip setuptools && \
apt-get update && \
apt-get install -yqq --no-install-recommends lsb-release curl gpg && \
curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION_MAJOR}.x | bash - && \
Expand All @@ -173,7 +175,7 @@ RUN cd /app/worker.py
echo "deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/debian/12/prod bookworm main" > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql18 && \
pip3 install --no-cache-dir -r ${REQUIREMENTS_FILE} && \
uv pip install --system --no-cache-dir -r ${REQUIREMENTS_FILE} && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
find /app/orchestrator/bin /etc/s6-overlay/s6-rc.d -type d -exec chmod 755 {} \; && \
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile.worker.python
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ COPY ./workers/python/src/ /usr/app/worker-python/src/
# by write this file to disk, the import of this dependency will not log the creation of a file.
COPY ./workers/python/canalyst.json /root/canalyst/keys.json


COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN set -ex; \
pip install --upgrade pip && \
pip install --upgrade setuptools && \
uv pip install --system --upgrade setuptools && \
groupadd --gid 1000 node && \
useradd --uid 1000 --gid node --shell /bin/bash --create-home node && \
apt-get update && \
Expand All @@ -39,7 +40,7 @@ RUN set -ex; \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql18 ${EXTRA_DEBIAN_PACKAGES} && \
rm -rf /var/lib/apt/lists/* && \
pip3 install -r requirements.txt && \
uv pip install --system -r requirements.txt && \
chmod -R u=rwx,go=rx /usr/app/worker-python

# this will fail if theres a dif
Expand Down
6 changes: 3 additions & 3 deletions workers/python/Dockerfile.freeze
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ RUN apt-get update && apt-get install -y cmake libblas-dev liblapack-dev && pyth

# install existing deps
COPY requirements.txt .
RUN python -m pip install --upgrade pip
RUN python -m pip install --no-cache-dir -r requirements.txt
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN uv pip install --system --no-cache-dir -r requirements.txt

# argument for additional dependency
ARG ADDITIONAL_DEP

# run additional install
RUN python -m pip install --no-cache-dir ${ADDITIONAL_DEP}
RUN uv pip install --system --no-cache-dir ${ADDITIONAL_DEP}

# update requirements file
RUN pip freeze > requirements.txt
Expand Down

0 comments on commit 712754c

Please sign in to comment.