Configuration and compilation in python env

Hello,

I have to work with a PyTorch project, but I rather new with it, and I don’t really know where to start.

At first a description of the current architecture of the project :

  • The project is mainly a big Python module. I need only a little part of it associated with ML, but
  • The input for the ML is preprocessed by a C++ module for performance reason. It also use a custom convolution filter for cuda, also written in C++ with cuda api
  • As they had problem of retrocompatibility with cuda updates and installation of GPU drivers they put everything in a docker. As I am under windows I have to use wsl. So, there is 3 layer of virtualisation : wsl, docker, conda. This is awful to install.

So, what I would like to do :

Create a new project in a virtual env (with pip ? Is there a special reason to use conda ?), without docker and wsl. The existing code is rather good and clear, so I would like to keep and re-use it. I would like something easy to clone from a computer to another.

For now, the main blocking point is this C++ embed in a Python module. This is the first time I work on this kind of project. For now, the compilation is launch each time pip install -e . is launched in the project, and it rather works when I am not fighting against conda and docker. But I am don’t really understand how it works and I don’t find many documentation on the net.

  • how should I organise my new project ? Is there good patterns for this ?
  • how am I supposed to manage and compile the C++ part of the code ?

Thanks for your help.