Code Monkey home page Code Monkey logo

Comments (2)

dbast avatar dbast commented on July 28, 2024

@alexander-smolyakov you are mixing different channels here:

  • the anaconda3 container has all the anaconda3 packages from defaults installed into the so called base env
  • the miniconda3 container has only conda + its dependencies in the base env
  • you try to install tensorflow / pytorch from conda-forge, which is an entire different channel compared to defaults!
  • it is best practise to leave the base env either untouched (and instead create a new env with the packages from a different channel) OR install tensorflow / pytorch from defaults.... reason is that installing packages from different channels with many dependencies easily causes conflicts.... the more there already is in the base env (lots of stuff in the anaconda3 case) the more likely this happens.

in other words:

FROM continuumio/miniconda3

# lets create a new env
RUN conda create --name test-env -c conda-forge --yes \
    tensorflow \
    pytorch

OR

FROM continuumio/anaconda3

# lets install into base, but only packages from defaults (no extra --channel parameter)
RUN conda install --yes \
    tensorflow \
    pytorch

from docker-images.

alexander-smolyakov avatar alexander-smolyakov commented on July 28, 2024

@dbast, thanks for your reply. I tested the suggested options. Creating a new environment works fine.

OR install tensorflow / pytorch from defaults....

FROM continuumio/anaconda3

# lets install into base, but only packages from defaults (no extra --channel parameter)
RUN conda install --yes \
    tensorflow \
    pytorch

When trying installation from the default channel, the same issue appears, and conda tries to resolve some conflicts in the environment during installation which take a lot of time:

=> [2/2] RUN   echo "conda install tensorflow"   && conda install --yes tensorflow   && echo "conda install pytorch"   && conda install --yes pytorch             676.8s
 => => # Collecting package metadata (current_repodata.json): ...working... done
 => => # Solving environment: ...working... unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
 => => # Solving environment: ...working... unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
 => => # Collecting package metadata (repodata.json): ...working... done
 => => # Solving environment: ...working... unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
 => => # Solving environment: ...working...

I wander if something is broken in the base environment.

from docker-images.

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.