talosh / flameTimewarpML

Flame Machine Learning Timewarp. based on arXiv2020-RIFE
MIT License
34 stars 9 forks source link

Manual installation without miniconda #68

Open buddly27 opened 3 years ago

buddly27 commented 3 years ago

Hi! Is there a way to get rid of the miniconda setup? The python dependencies seem to be defined with the requirement.txt file, so it would theoretically be possible to manage the environment differently. You are using the FLAMETWML_MINICONDA to activate the conda environment from within the code, but could it be replaced by a subprocess.call instead? (or a thead).

import threading
import subprocess

class Worker(threading.Thread):

    def run(self):
         command_wrapper = os.path.join(self.framework.bundle_path, 'command_wrapper.py')

         subprocess.Popen(
             'python {} {}'.format(command_wrapper, lockfile_path),
             stdout=subprocess.PIPE,
             stderr=subprocess.PIPE
        )

worker = Worker()
worker.start()
talosh commented 3 years ago

Hi Buddly, miniconda was a quick way to create isolaited python3 environment as Flame used to run python2.7 prior to 2022 release. One of the ways to get rid of miniconda completely would probvably be to compile those four python scrips that's been called from Flame script into ststic binaries, that'd probably work without breaking the compatibility with releases prior to 2022

alatteri commented 3 years ago

Hi Talosh..... I think that would be a good idea. Now that Flame is python3 native, simplifying the install process would be great.

buddly27 commented 3 years ago

One of the ways to get rid of miniconda completely would probvably be to compile those four python scrips that's been called from Flame script into ststic binaries, that'd probably work without breaking the compatibility with releases prior to 2022

Maybe one less intrusive installation process would be to just request a path to a Python 3 executable? Maybe via a FLAMETWML_PYTHON_EXE environment variable? I understand the need to maintain compatibility with older flame versions, but embedding a full conda environment for one plugin is a bit hardcore :)