Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add dev deps and eval scripts to Dockerfile #341

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ARG WHEEL_VERSION=""
## Enable Aimstack if requested via ENABLE_AIM set to "true"
ARG ENABLE_AIM=false
ARG ENABLE_FMS_ACCELERATION=true
ARG ENABLE_DEV=false

## Base Layer ##################################################################
FROM registry.access.redhat.com/ubi9/ubi:${BASE_UBI_IMAGE_TAG} AS base
Expand Down Expand Up @@ -110,6 +111,7 @@ ARG USER
ARG USER_UID
ARG ENABLE_FMS_ACCELERATION
ARG ENABLE_AIM
ARG ENABLE_DEV

RUN dnf install -y git && \
# perl-Net-SSLeay.x86_64 and server_key.pem are installed with git as dependencies
Expand Down Expand Up @@ -146,6 +148,11 @@ RUN if [[ "${ENABLE_AIM}" == "true" ]]; then \
python -m pip install --user "$(head bdist_name)[aim]"; \
fi

RUN if [[ "${ENABLE_DEV}" == "true" ]]; then \
python -m pip install --user "$(head bdist_name)[dev]"; \
# python -m pip install --user "$(head bdist_name)[dev] $(head bdist_name)[gptq-dev]"; \
fi

# Clean up the wheel module. It's only needed by flash-attn install
RUN python -m pip uninstall wheel build -y && \
# Cleanup the bdist whl file
Expand All @@ -156,6 +163,8 @@ FROM release-base AS release
ARG USER
ARG PYTHON_VERSION
ARG ENABLE_AIM
ARG EVAL_SCRIPT_PATH=
ARG INF_SCRIPT_PATH=

RUN mkdir -p /licenses
COPY LICENSE /licenses/
Expand All @@ -177,6 +186,11 @@ COPY build/accelerate_launch.py fixtures/accelerate_fsdp_defaults.yaml /app/
COPY build/utils.py /app/build/
RUN chmod +x /app/accelerate_launch.py

# Hack to get the dev scripts copied in only when they are set
# When these vars are not set, copy doesn't happen
COPY ${EVAL_SCRIPT_PATH} /app/
COPY ${INF_SCRIPT_PATH} /app/

ENV FSDP_DEFAULTS_FILE_PATH="/app/accelerate_fsdp_defaults.yaml"
ENV SET_NUM_PROCESSES_TO_NUM_GPUS="True"

Expand Down
Loading