Skip to content

Commit

Permalink
Adding Support for Python3.10 (quic#141)
Browse files Browse the repository at this point in the history
* fixing the EOL

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* changing torch to 2.5.0

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* adding python3.10-venv installation in Jenkins

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* reverting the installation instruction

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* adding python3.10-venv instruction

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* adding python3.10-venv instruction with sudo

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* Update Jenkinsfile

Signed-off-by: Amit Raj <168538872+quic-amitraj@users.noreply.github.com>

* Removing torch=2.5.0 from this PR

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* Fixing Format

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* README updated

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

* LF formatted

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>

---------

Signed-off-by: Abukhoyer Shaik <quic_abukhoye@quicinc.com>
Signed-off-by: Amit Raj <168538872+quic-amitraj@users.noreply.github.com>
Co-authored-by: Amit Raj <168538872+quic-amitraj@users.noreply.github.com>
  • Loading branch information
abukhoy and quic-amitraj authored Nov 4, 2024
1 parent b33197f commit 23ca9ca
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ FROM docker-registry.qualcomm.com/library/ubuntu:20.04
RUN apt-get update && apt-get install -y \
git \
tmux \
python3.8 \
python3.8-venv \
python3.10 \
python3.10-venv \
python3-pip

# pip recognizes this variable
Expand All @@ -24,7 +24,7 @@ RUN mkdir -p /app/qefficient-library
COPY . /app/qefficient-library

# Create Virtual Env for the docker image
RUN python3.8 -m venv /app/llm_env
RUN python3.10 -m venv /app/llm_env
RUN . /app/llm_env/bin/activate
WORKDIR /app/qefficient-library

Expand All @@ -33,7 +33,7 @@ WORKDIR /app/qefficient-library
RUN pip install torch==2.0.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu --no-deps
RUN pip install datasets==2.17.0 fsspec==2023.10.0 multidict==6.0.5 sentencepiece --no-deps

RUN python3.8 -m pip install .
RUN python3.10 -m pip install .
WORKDIR /app/qefficient-library

# Set the environment variable for the model card name and token ID
Expand All @@ -45,7 +45,7 @@ ENV TOKEN_ID = ""
# Print a success message
CMD ["echo", "qefficient-transformers repository cloned and setup installed inside Docker image."]
CMD ["echo", "Starting the Model Download and Export to Onnx Stage for QEff."]
CMD python3.8 -m QEfficient.cloud.export --model-name "$MODEL_NAME"
CMD python3.10 -m QEfficient.cloud.export --model-name "$MODEL_NAME"

# Example usage:
# docker build -t qefficient-library .
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ For other models, there is comprehensive documentation to inspire upon the chang
## Quick Installation
```bash

# Create Python virtual env and activate it. (Recommended Python 3.8)

python3.8 -m venv qeff_env
# Create Python virtual env and activate it. (Recommended Python 3.10)
sudo apt install python3.10-venv
python3.10 -m venv qeff_env
source qeff_env/bin/activate
pip install -U pip

Expand Down
4 changes: 2 additions & 2 deletions docs/source/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
``Warning: Efficient Transformers have been validated to work with the same compatible SDK. Upgrading this may result in certain models becoming incompatible.``

```bash
# Create Python virtual env and activate it. (Required Python 3.8)
# Create Python virtual env and activate it. (Required Python 3.10)

python3.8 -m venv qeff_env
python3.10 -m venv qeff_env
source qeff_env/bin/activate
pip install -U pip

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Operating System :: Linux",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Artificial Intelligence for Inference Accelerator",
]
requires-python = ">=3.8,<3.11"
Expand Down
2 changes: 1 addition & 1 deletion scripts/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pipeline
steps
{
sh '''
python3.8 -m venv preflight_qeff
python3.10 -m venv preflight_qeff
. preflight_qeff/bin/activate
pip install --upgrade pip setuptools
pip install .[test] --extra-index-url https://download.pytorch.org/whl/cpu
Expand Down

0 comments on commit 23ca9ca

Please sign in to comment.