Repository: Cloud-CV/EvalAI
Issue: Update versions of python used due to end of life
Root cause: Environment Incompatibility

The Dockerfiles and other dependencies in the repository currently rely on Python versions (3.7.5, 3.8.10) that are now end-of-life or nearing end-of-life in security status.
Using outdated Python versions can pose security risks.
_Python 3.7_ reached end-of-life on June 27, 2023.
_Python 3.8_ reached end-of-life on October 14, 2024 (depending on the exact release schedule).

### **Proposed Solution** : To Upgrade python versions 
Move the Dockerfiles (and any relevant scripts) to a currently supported Python version (e.g. 3.10, or 3.11, depending on project compatibility).

### Update Dependencies:
Review and update any libraries or dependencies that may be incompatible with newer Python versions.

### **Testing & CI:**
Ensure all tests pass locally and in CI pipelines.
Update any references in documentation (README, CONTRIBUTING, etc.) to reflect the new Python versions.

### Open Questions / Considerations : 
- Are there known compatibility concerns with upgrading to newer Python versions?
- Do maintainers have a preferred target version of Python (e.g., 3.9 vs. 3.10)?
- Is there a planned timeline or roadmap for dropping support for Python 3.7/3.8?


I've been running things with python 3.9.21. Everything falls apart starting at 3.10


Hi @Zahed-Riyaz @veb-101, Thanks for opening the issues. Would any of you wants to work on this?
cc: @gautamjajoo 

Hi @RishabhJain2018 , sure. I'd like to work on this issue 

Hey @Zahed-Riyaz , Any updates on this?

Hi @RishabhJain2018 , as of now I'm trying to update all the requirements and dockerfiles to work with Python 3.12.9. I'm looking for the most stable/latest version of each library that will be compatible with python 3.12.

Got it, Thanks for the update.

Hi @RishabhJain2018 @gautamjajoo 
I'm upgrading the libraries and have updated the main worker image to use `python:3.12.9`. 

Currently, the repository maintains two worker images: one using `python:3.7.5` (worker) and one using `python:3.8.10` (worker_py3.8). Could you clarify what the intended strategy is for worker_py3.8? 

And if there's no issues can we unify the environments, i.e, upgrade worker_py3.8 to the same as the main worker image, assuming all dependencies now support it? 

Or keep the worker_py3.8 at `python:3.8.10` for any tasks that might still require that specific runtime?



Hi @RishabhJain2018  
Update : So I used pip tools to try and get the latest versions of all the libraries without conflicts but when I run `docker-compose up` EvalAI does not open as intended on localhost. 

There was also an issue with `django-autofixtures`, it seems to not be compatible with python versions beyond 3.9.21. Updating to anything beyond Python:3.9.21 is going to require rewriting some sections of the code using newer libraries.

For now I can make a PR by updating the dockerfiles to use Python 3.9.21, and maybe future issues could focus on improving the codebase to be compatible with newer python versions 

>Update : So I used pip tools to try and get the latest versions of all the libraries without conflicts but when I run docker-compose up EvalAI does not open as intended on localhost.

>There was also an issue with django-autofixtures, it seems to not be compatible with python versions beyond 3.9.21. Updating to anything beyond Python:3.9.21 is going to require rewriting some sections of the code using newer libraries.

>For now I can make a PR by updating the dockerfiles to use Python 3.9.21, and maybe future issues could focus on improving the codebase to be compatible with newer python versions


Thanks for the update and this sounds good.

>And if there's no issues can we unify the environments, i.e, upgrade worker_py3.8 to the same as the main worker image, assuming all dependencies now support it?
Or keep the worker_py3.8 at python:3.8.10 for any tasks that might still require that specific runtime?

No, let's not change these for now. There are challenges which are using these.

Hey @Zahed-Riyaz Any updates on this?

Hi @RishabhJain2018 , travis CI is unable to build django container even though it works fine on my local machine.
I think the issue might potentially be because it times out looking for packages compatible with the python version, so some further investigation into that + restricting packages should resolve it

The issue is fixed now , the PR is ready to be reviewed :)

Reviewed the PR.

@RishabhJain2018 the PR is ready for review again