-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add basic check * apply autoflake * apply isort * apply black * add docker pipeline * maximize build space * use internal actions * make GA happy * update github action * add lock file * pass ci * fix typo * fix typo * check proxy * check proxy * add proxy * sync docker image everywhere * fix config error * add sync docker image in separate PR --------- Co-authored-by: Yi-01-ai <yi@01.ai>
- Loading branch information
Showing
11 changed files
with
2,966 additions
and
53 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
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,20 +1,49 @@ | ||
ARG REGISTRY="nvcr.io" | ||
ARG CUDA_VERSION="11.8.0" | ||
FROM mambaorg/micromamba:1.5.1 as micromamba | ||
FROM ${REGISTRY}/nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04 as base | ||
|
||
ARG MAX_JOBS=8 | ||
|
||
##### | ||
# Setup user & common tools | ||
##### | ||
RUN apt update \ | ||
&& apt install -y python3-pip python3-packaging git ninja-build \ | ||
&& pip3 install -U pip \ | ||
&& ln -s /usr/bin/python3 /usr/bin/python | ||
&& apt install -y git ninja-build \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /yi | ||
##### | ||
# Setup micromamba | ||
##### | ||
|
||
USER root | ||
|
||
ARG MAMBA_USER=yi | ||
ARG MAMBA_USER_ID=56789 | ||
ARG MAMBA_USER_GID=56789 | ||
ENV MAMBA_USER=$MAMBA_USER | ||
ENV MAMBA_ROOT_PREFIX="/opt/conda" | ||
ENV MAMBA_EXE="/bin/micromamba" | ||
ENV ENV_NAME=yi | ||
|
||
RUN pip3 install torch==2.0.1 \ | ||
&& pip3 install flash-attn==2.3.3 --no-build-isolation | ||
COPY --from=micromamba "$MAMBA_EXE" "$MAMBA_EXE" | ||
COPY --from=micromamba /usr/local/bin/_activate_current_env.sh /usr/local/bin/_activate_current_env.sh | ||
COPY --from=micromamba /usr/local/bin/_dockerfile_shell.sh /usr/local/bin/_dockerfile_shell.sh | ||
COPY --from=micromamba /usr/local/bin/_entrypoint.sh /usr/local/bin/_entrypoint.sh | ||
COPY --from=micromamba /usr/local/bin/_dockerfile_initialize_user_accounts.sh /usr/local/bin/_dockerfile_initialize_user_accounts.sh | ||
COPY --from=micromamba /usr/local/bin/_dockerfile_setup_root_prefix.sh /usr/local/bin/_dockerfile_setup_root_prefix.sh | ||
|
||
COPY ./requirements.txt . | ||
RUN pip3 install -r requirements.txt | ||
RUN /usr/local/bin/_dockerfile_initialize_user_accounts.sh && \ | ||
/usr/local/bin/_dockerfile_setup_root_prefix.sh | ||
|
||
USER $MAMBA_USER | ||
SHELL ["/usr/local/bin/_dockerfile_shell.sh"] | ||
ENTRYPOINT ["/usr/local/bin/_entrypoint.sh"] | ||
CMD ["/bin/bash"] | ||
|
||
# Install dependencies | ||
|
||
WORKDIR /yi | ||
COPY ./conda-lock.yml . | ||
RUN micromamba create -y -n ${ENV_NAME} -f conda-lock.yml && \ | ||
micromamba clean --all --yes | ||
|
||
COPY . . | ||
COPY . . |
Oops, something went wrong.