Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem setting up to run the demo listed in README.txt #3590

Open
craigphicks opened this issue Aug 3, 2024 · 0 comments
Open

Problem setting up to run the demo listed in README.txt #3590

craigphicks opened this issue Aug 3, 2024 · 0 comments

Comments

@craigphicks
Copy link

craigphicks commented Aug 3, 2024

I am trying to set up a Docker container to run the demo as described prior to TorchScript ResNet18.

Actions attempting to follow the README instructions:

  1. Set up a Dockerfile (this was not in the instructions, but is required for reproducibility):
FROM nvidia/cuda:11.8.0-base-ubuntu22.04

ENV PYTHON_VERSION=3.11

ENV PATH=/opt/conda/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/conda/lib"

ENV PYTHONIOENCODING=UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
ENV CONDA_AUTO_UPDATE_CONDA=false

RUN apt update
RUN apt install -y bash \
    build-essential \
    git \
    curl \
    ca-certificates \
    wget \
    && rm -rf /var/lib/apt/lists

# Install Miniconda and create main env
ADD https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh miniconda3.sh
RUN /bin/bash miniconda3.sh -b -p /opt/conda \
    && rm miniconda3.sh \
    && /opt/conda/bin/conda install -y -c anaconda \
    python=$PYTHON_VERSION \
    && /opt/conda/bin/conda clean -ya

RUN /opt/conda/bin/conda config --set ssl_verify False \
    && pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org \
    && ln -s /opt/conda/bin/pip /usr/local/bin/pip3

# Install requirements
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt \
    && rm requirements.txt

CMD ["/bin/bash"]
  1. Build the image, then execute the following inside a running container -
root@4415caed30f5:/# python3.11 -m venv mlir_venv
root@4415caed30f5:/# source mlir_venv/bin/activate
(mlir_venv) root@4415caed30f5:/# pip install --pre torch-mlir torchvision \
  --extra-index-url https://download.pytorch.org/whl/nightly/cpu
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cpu
ERROR: Could not find a version that satisfies the requirement torch-mlir (from versions: none)
ERROR: No matching distribution found for torch-mlir
  1. Also tried the suggested "alternate" method
conda create -n torch-mlir python=3.11
conda activate torch-mlir
...

but ran into errors there also.

Discussion

Seems like some version matching problem.

With a working Dockerfile and tested setup using a specific version (rather than a latest version) the demo setup and execution should be always reproducible.

@craigphicks craigphicks changed the title Problem setting up to run the demo listed in README.txt #3589 Problem setting up to run the demo listed in README.txt Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant