Giter VIP home page Giter VIP logo

intel / ai-containers Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 17.0 6.73 MB

This repository contains Dockerfiles, scripts, yaml files, Helm charts, etc. used to scale out AI containers with versions of TensorFlow and PyTorch that have been optimized for Intel platforms. Scaling is done with python, Docker, kubernetes, kubeflow, cnvrg.io, Helm, and other container orchestration frameworks for use in the cloud and on-premise

Home Page: https://intel.github.io/ai-containers/

License: Apache License 2.0

Dockerfile 11.79% Python 51.86% Jupyter Notebook 30.44% Shell 5.50% Smarty 0.40%
docker docker-compose helm intel kubernetes pytorch scikit-learn tensorflow

ai-containers's People

Contributors

ashahba avatar cholocate avatar claynerobison avatar dependabot[bot] avatar dmsuehir avatar dvrogozh avatar gera-aldama avatar harsharamayanam avatar ishaghosh27 avatar jafraustro avatar jitendra42 avatar keithachorn-intel avatar ma-pineda avatar pre-commit-ci[bot] avatar sharvil10 avatar sramakintel avatar step-security-bot avatar tingshep avatar tylertitsworth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ai-containers's Issues

XPU Jupyter containers do not appear to have Jupyter installed in them

Describe the bug

I was trying to use the images documented here. However, they do not appear to have Jupyter in them:

docker run -it --rm \
    -p 8888:8888 \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    --ipc=host \
    intel/intel-extension-for-pytorch:2.1.20-xpu-pip-base
(idp) root@5711063c540f:/# python -m jupyter --version
/opt/conda/envs/idp/bin/python: No module named jupyter

Within the container, if I manually install jupyter then the server is there:

(idp) root@5711063c540f:/# cat << EOF > requirements.txt
jupyterlab==4.3.0a0
jupyterhub==5.0.0
notebook==7.3.0a0
jupyter-server-proxy>=4.1.2
EOF
(idp) root@5711063c540f:/# pip install -r requirements.txt
(idp) root@5711063c540f:/# python -m jupyter --version
Selected Jupyter core packages...
IPython          : 8.26.0
ipykernel        : 6.29.5
ipywidgets       : not installed
jupyter_client   : 8.6.2
jupyter_core     : 5.7.2
jupyter_server   : 2.14.1
jupyterlab       : 4.3.0a0
nbclient         : 0.10.0
nbconvert        : 7.16.4
nbformat         : 5.10.4
notebook         : 7.3.0a0
qtconsole        : not installed
traitlets        : 5.14.3

Error Logs

/opt/conda/envs/idp/bin/python: No module named jupyter

Reproduction Instructions

docker run -it --rm \
    -p 8888:8888\
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    --ipc=host \
    intel/intel-extension-for-pytorch:2.1.20-xpu-pip-base \
    python -m jupyter --version
/opt/conda/envs/idp/bin/python: No module named jupyter

I have tried the tags xpu-jupyter, 2.1.20-xpu-pip-base, and 2.1.10-xpu-pip-base all with the same effect.



### Affected Subfolder

- [ ] classical-ml
- [ ] enterprise
- [ ] preset
- [ ] python
- [X] pytorch
- [ ] tensorflow
- [ ] test-runner
- [ ] workflows

### Versions

```Markdown
Using the image published at intel/intel-extension-for-pytorch:{xpu-jupyter,2.1.20-xpu-pip-base,2.1.10-xpu-pip-base}

Tensorflow build with AVX512?

Description

Is there a version of this image with that uses AVX512 available?

https://hub.docker.com/r/intel/intel-optimized-tensorflow-avx512 seems unmaintained, so I'm hoping these images can fill that gap :)

tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI AVX512_BF16 AVX_VNNI AMX_TILE AMX_INT8 AMX_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.

Describe the solution you'd like

Duplicate all tags of https://hub.docker.com/r/intel/intel-extension-for-tensorflow to have a version that uses AVX512.

Describe alternatives you've considered

No response

ipex-xpu-jupyter in https://github.com/intel/ai-containers/blob/main/pytorch/Dockerfile is incorrectly checking for conda

Describe the bug

While trying to add some additional functionality to a derived version of the ipex-xpu-jupyter container, attempting to access the shell results in bash complaining that conda does not exist:

docker run -it --rm \
    -p 8888:8888 \
    --net=host \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    --ipc=host \
    intel/intel-extension-for-pytorch:2.1.20-xpu-pip-jupyter \
    /bin/bash
WARNING: Published ports are discarded when using host network mode
bash: conda: command not found

Conda is not installed in the intel-xpu-base layer, nor intel-xpu-jupyter layer. However, the Dockerfile layer for intel-xpu-jupyter is adding 'conda activate idp' regardless. This is due to this check in the Dockerfile:

RUN if [ ! -d "$(which conda)" ]; then \
    echo "conda activate idp" >> ~/.bashrc; \
    fi

That check is attempting to check if conda exists, and then add the conda activate idp to the .bashrc.

However, which returns the path to the executable (if it is in the path) and not a file. The the '-d' check will fail if conda is installed (which returns file path) and if conda is not installed (which returns nothing, so no directory). The '!' inverts that failure to be success. The net result is the conda command will be added to ~/.bashrc regardless of whether conda exists or not.

A corrected line:

# If conda is in the path, activate idp environment
RUN if $(which conda >/dev/null); then \
    echo "conda activate idp" >> ~/.bashrc \
fi

The instructions are also telling the user to publish a port (-p) and use --net=host; you shouldn't need --net=host since you are publishing the internal port 8888 to the host port 8888.

Error Logs

WARNING: Published ports are discarded when using host network mode
bash: conda: command not found

Reproduction Instructions

docker run -it --rm \
    -p 8888:8888 \
    --net=host \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path \
    --ipc=host \
    intel/intel-extension-for-pytorch:2.1.20-xpu-pip-jupyter \
    /bin/bash

Affected Subfolder

  • classical-ml
  • enterprise
  • preset
  • python
  • pytorch
  • tensorflow
  • test-runner
  • workflows

Versions

intel/intel-extension-for-pytorch:2.1.20-xpu-pip-jupyter

Intel Python full container fails to build

Describe the bug

The package intelpython3_full fails when installing version 2024.2.0. Switching back to 2024.1.0 does not cause this issue, and it appears that the latest version has been added/updated 5 days ago: https://anaconda.org/intel/intelpython3_full/files

Error Logs

=> ERROR [idp idp 4/6] RUN conda run -n idp python -m pip install --no-cache-dir -r idp-requirements.txt                                                                                                                        0.7s
------
 > [idp idp 4/6] RUN conda run -n idp python -m pip install --no-cache-dir -r idp-requirements.txt:
0.590 
0.590 EnvironmentLocationNotFound: Not a conda environment: /opt/conda/envs/idp/envs/idp
0.590 
------

### Remove the failing command

idp-1  | # conda environments:
idp-1  | #
idp-1  |                          /opt/conda
idp-1  | base                     /opt/conda/envs/idp
idp-1 exited with code 0

### This output is incorrect, it should look like

idp-1  | # conda environments:
idp-1  | #
idp-1  | base                     /opt/conda
idp-1  | idp                      /opt/conda/envs/idp
idp-1  | 
idp-1 exited with code 0

Reproduction Instructions

cd python
IDP_VERSION=full docker compose up --build
# comment out lines 75-79
IDP_VERSION=full docker compose up --build
# switch back to last version, uncomment lines 75-79
IDP_VERSION=full==2024.1.0 docker compose up --build

Affected Subfolder

  • classical-ml
  • enterprise
  • preset
  • python
  • pytorch
  • tensorflow
  • test-runner

Versions

Docker Compose version v2.26.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.