forked from intel/llm-on-ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[inference][issue-67] support pip install in docker container (intel#81)
* [inference][issue-67] support pip install in docker container Signed-off-by: Jiafu Zhang <[email protected]> * [inference][issue-67] support pip install in docker container add one more pip non-editable test for real user case Signed-off-by: Jiafu Zhang <[email protected]> * [inference][issue-67] support pip install in docker container add one more pip non-editable test for real user case - gpt-j-6b Signed-off-by: Jiafu Zhang <[email protected]> * [inference][issue-67] support pip install in docker container revert unintentional changes Signed-off-by: Jiafu Zhang <[email protected]> --------- Signed-off-by: Jiafu Zhang <[email protected]>
- Loading branch information
Showing
7 changed files
with
48 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# with [tools.setuptools] in pyproject.toml, the configs below work in both baremetal and container | ||
include inference/**/*.yaml |
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM ubuntu:22.04 | ||
|
||
ENV LANG C.UTF-8 | ||
|
||
WORKDIR /root/llm-on-ray | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt apt-get update -y \ | ||
&& apt-get install -y build-essential cmake wget curl git vim htop ssh net-tools \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CONDA_DIR /opt/conda | ||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ | ||
/bin/bash ~/miniconda.sh -b -p /opt/conda | ||
ENV PATH $CONDA_DIR/bin:$PATH | ||
|
||
# setup env | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
RUN --mount=type=cache,target=/opt/conda/pkgs conda init bash && \ | ||
unset -f conda && \ | ||
export PATH=$CONDA_DIR/bin/:${PATH} && \ | ||
conda config --add channels intel && \ | ||
conda install python==3.9 | ||
|
||
# copy all checkedout file for later non-editable pip | ||
COPY . . | ||
|
||
RUN --mount=type=cache,target=/root/.cache/pip pip install .[cpu,deepspeed] -f https://developer.intel.com/ipex-whl-stable-cpu \ | ||
-f https://download.pytorch.org/whl/torch_stable.html | ||
|
||
RUN ds_report | ||
|
||
# Used to invalidate docker build cache with --build-arg CACHEBUST=$(date +%s) | ||
ARG CACHEBUST=1 | ||
COPY ./dev/scripts/install-oneapi.sh /tmp | ||
RUN /tmp/install-oneapi.sh |
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