Code Monkey home page Code Monkey logo

Comments (1)

leihuayi avatar leihuayi commented on July 4, 2024

It does not solve your problem in an easy way, but you could install it in a Docker to run your code, in case the problem comes from your Conda installation ?

  1. Edit pulse.yml : add conda-forge channel, and remove all elements after the second "=" in dependancies (as stated in the README). Change libfortran=3.0.1 to libfortran as this version only works on osx.
  2. Write a Dockerfile in pulse folder:
FROM nvidia/cuda:10.2-runtime
# /!\ the cuda version depends on your computer. Adapt the above line correspondingly.

# Declare some ARGuments
ARG NAME=pulse
# Installation of some libraries / RUN some commands on the base image
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip python3-dev \
    libz-dev libopenblas-dev libatlas-base-dev libgtk-3-dev \
    libboost-filesystem-dev build-essential cmake pkg-config curl && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# INSTALLATION OF CONDA
ENV PATH /opt/conda/bin:$PATH
RUN curl 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh' > ~/miniconda.sh && \
    /bin/bash ~/miniconda.sh -b -p /opt/conda && \
    rm ~/miniconda.sh && \
    /opt/conda/bin/conda clean -tipsy && \
    ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
    echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
    echo "conda activate base" >> ~/.bashrc
ENV PATH /opt/conda/envs/gpuenvs/bin:$PATH

WORKDIR /home/${NAME}

# Install the python dependencies
COPY . .
RUN conda update -n base -c defaults conda
RUN conda env create -f pulse.yml

CMD /bin/bash
  1. Build docker build –t pulse:latest .
  2. Run docker run -it --rm --gpus all --name pulse --entrypoint bash -v "$PWD:/home/pulse" pulse:latest (you might need to change --gpus all by --runtime==nvidia if your Docker version is older)
  3. Once you are inside the container, your "pulse" folder on your computer is in sync with the "pulse" folder on the docker. You can quit the container, add images, come back in again. Activate the environment by running conda activate pulse then run the code like usual python run.py .

from pulse.

Related Issues (20)

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.