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

ResolvePackageNotFound: - pytorch=1.0.0 , when I run conda env create -f environment.yaml #126

Open
ChristianMilianti opened this issue Jun 15, 2023 · 3 comments

Comments

@ChristianMilianti
Copy link

Hi!

When I run conda env create -f environment.yaml
I get the following error:

Solving environment: failed

ResolvePackageNotFound: 
  - pytorch=1.0.0

Does anyone know of a workaround? Do any newer versions of pytorch work?

Other info:
I've tried it on 2 different computers with 2 different OS (Ubuntu 18.04, and 20.04) and have received the same issue.
I'm using miniconda.

Thanks!

@apotdar2023
Copy link

Running into the same problem. Is there a work around for this? Also isn't pytorch v1.0.0 very old??

@ChristianMilianti
Copy link
Author

Hey @apotdar2023,
I've "sort of" got it to work, see below.

  1. I modified the environment.yaml file, and removed the - pytorch=1.0.0 & - torchvision=0.2.1 requirements.

  2. I then created and activated the enviornment

conda env create -f environment.yaml
conda activate mesh_funcspace
  1. Then I installed CUDA Toolkit 10.0 (only installed CUDA Toolkit, not the driver) for my system (Ubuntu 18.04) via the runfile.

  2. Then updated my path variables so CUDA could be found.

export PATH=/usr/local/cuda-10.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH
  1. Then downloaded and installed torch and torch vision wheels from https://download.pytorch.org/whl/cu100/torch_stable.html
pip install torch-1.0.0-cp36-cp36m-linux_x86_64.whl
pip install torchvision-0.2.0-py2.py3-none-any.whl
  1. After I did the above I tried running python setup.py build_ext --inplace, but encountered the same error as fix installation error #105 , editing setup.py as per 9dd0daa fixed the issue for me.

  2. I installed Meshlab to view the .off files but I couldn't see them for some reason??

  3. Downloaded the preprocessed data (took ~ 8 hours to download)

  4. Tried running the generate.py script after the preprocessed data was downloaded but encountered some issues. Was able to eventually get python generate.py configs/unconditional/onet_cars_pretrained.yaml working by forcing generate.py to use CPU by adding device = "cpu" after line 31 in generate.py. Took about 20 min or so to run for me (not sure if this is typical?).

  5. I was then able to visualise the results with meshlab.

Other: The error I'm getting when running generate.py with CUDA is the following

File "generate.py", line 164, in <module>
    out = generator.generate_mesh(data)
  File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/generation.py", line 81, in generate_mesh
    mesh = self.generate_from_latent(z, c, stats_dict=stats_dict, **kwargs)
  File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/generation.py", line 124, in generate_from_latent
    pointsf, z, c, **kwargs).cpu().numpy()
  File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/generation.py", line 151, in eval_points
    occ_hat = self.model.decode(pi, z, c, **kwargs).logits
  File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/models/__init__.py", line 110, in decode
    logits = self.decoder(p, z, c, **kwargs)
  File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/models/decoder.py", line 55, in forward
    net = self.fc_p(p)
  File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 67, in forward
    return F.linear(input, self.weight, self.bias)
  File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/functional.py", line 1354, in linear
    output = input.matmul(weight.t())
RuntimeError: cublas runtime error : the GPU program failed to execute at /pytorch/aten/src/THC/THCBlas.cu:258

I tried solving by running conda install mkl -c anaconda as per #100 but that didn't seem to fix the issue.

I believe there could be an issue due to me using a 30 series GPU and CUDA toolkit 10?

If you or anyone else are able to get this working, please let me know how! Any help would be greatly appreciated. :)

@hahahahahahahap
Copy link

I had the same problem. My.off file is empty.

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

3 participants