forked from aphrodite-engine/aphrodite-engine
-
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.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# default base image | ||
ARG BASE_IMAGE="763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-inference-neuronx:2.1.1-neuronx-py310-sdk2.17.0-ubuntu20.04" | ||
|
||
FROM $BASE_IMAGE | ||
|
||
RUN echo "Base image is $BASE_IMAGE" | ||
|
||
# Install some basic utilities | ||
RUN apt-get update && apt-get install python3 python3-pip -y | ||
|
||
### Mount Point ### | ||
# When launching the container, mount the code directory to /app | ||
ARG APP_MOUNT=/app | ||
VOLUME [ ${APP_MOUNT} ] | ||
WORKDIR ${APP_MOUNT} | ||
|
||
RUN python3 -m pip install --upgrade pip | ||
RUN python3 -m pip install --no-cache-dir fastapi ninja tokenizers pandas | ||
RUN python3 -m pip install sentencepiece transformers==4.36.2 -U | ||
RUN python3 -m pip install transformers-neuronx --extra-index-url=https://pip.repos.neuron.amazonaws.com -U | ||
RUN python3 -m pip install --pre neuronx-cc==2.12.* --extra-index-url=https://pip.repos.neuron.amazonaws.com -U | ||
|
||
COPY ./aphrodite /app/aphrodite-engine/aphrodite | ||
COPY ./setup.py /app/aphrodite-engine/setup.py | ||
COPY ./requirements-common.txt /app/aphrodite-engine/requirements-common.txt | ||
COPY ./requirements-neuron.txt /app/aphrodite-engine/requirements-neuron.txt | ||
|
||
RUN cd /app/aphrodite-engine \ | ||
&& python3 -m pip install -U -r requirements-neuron.txt | ||
|
||
ENV APHRODITE_TARGET_DEVICE="neuron" | ||
RUN cd /app/aphrodite-engine \ | ||
&& pip install -e . \ | ||
&& cd .. | ||
|
||
CMD ["/bin/bash"] |