MortenTabaka / Semantic-segmentation-of-LandCover.ai-dataset

An implementation of Deeplabv3plus in TensorFlow2 for semantic land cover segmentation
Other
20 stars 7 forks source link

tf2.yml enviroment #1

Closed Talkraicer closed 1 year ago

Talkraicer commented 2 years ago

Hey, I've been trying to use conda as you have suggested in order to create the environment specified in tf2.yml I keep getting the below error and can't find a solution: image I'm using conda 4.12.0. I would like some help, Thanks, Tal

MortenTabaka commented 2 years ago

Hi, I found what's the issue and soon I will upload fixed tf2.yml or you can do quick fix in your file.

What was wrong? According to this answer, when I created this file via Conda, the pip itself was not listed for Conda to install. Therefore the solution is adding -pip above -pip:.

  - pip
  - pip:
    - absl-py==0.12.0

I hope you will not run into other problems with the environment, since it can be sometimes moody.

Best, Marcin

Talkraicer commented 2 years ago

Hi Marcin, sorry to bother you again. I've seen the solution you've suggested online as well, and it did solve the warning. But, as you can see, this isn't the main problem, but only a warning and also it says that it's adding the -pip automuatically.

The main problem is the ResolvePackageNotFound, which appears any time I run the conda env create, and it shows up with different packages each time. I googled this problem as well, and found that in order to solve it I should move the packages in the list to under the -pip: part in the tf2.yml file. I've tried this as well but still having trouble.

Do you have any suggestion to deal with that? Thanks, Tal

MortenTabaka commented 2 years ago

Hi,

The problem is probably caused by the fact that we are using different operating systems. Therefore, the compilations of these packages may not be the same. Also, there are some inconsistencies in the environment and it gives me an another error during installation.

I would recommend you to install Tensorflow from scratch. Then you should be able to run my code (maybe you will have to add a few packages).

Please take a look at this awesome tutorial from @jeffheaton, which has been a great help to me: Installing TensorFlow/Keras CPU/GPU w/CONDA (July, 2020)

Instruction on Github

Although the video is from 2020, the instructions are still up-to-date and the file on Github is being consistently updated.

Best, Marcin

MortenTabaka commented 2 years ago

P.s. If you are running Tensorflow on Nvidia GPU and an error Could not load dynamic library 'libcudnn.so.8' would occur, then you may find solution here.

In my case command conda install -c nvidia cudnn solved the issue.

MortenTabaka commented 1 year ago

Building docker image with Docker file was introduced (tested on Ubuntu with GPU): https://github.com/MortenTabaka/Semantic-segmentation-of-LandCover.ai-dataset/tree/SSLA-5-Add-Docker-image-for-the-project#docker---tensorflow-gpu-recommended

I have in plans to implement Docker Hub - Github integration for running the project even faster.