Repo organisation- virtual environments set up Module 1 Lesson 2

I have a question regarding the organisation of the repo.

The professor shows the typical organisation of a folder for a GEN AI app and the activation of a virtual environment.

But in the actual repo, the requiremnts.txt can be found OUTSIDE the folder corresponding Lesson_02

Questions: do we have to copy requiremnts.txt inside Lesson_02 , to be able to pip install -r requiremnts.txt ?

Do we have to create a virtual environment for each lesson folder ?

If someone from the deeplleaning.ai team could respond please ? @chris.favila

1 Like

Thank you for bringing this up! We’ll check it! cc @jan.ravnik

You are right, the typical project would have the requirements file within the project folder.
In case of this course repo, we decided not to make a separate requirements file for each of the lessons, as it would repeat a lot and it would take you a lot of unnecessary time to install it again and again for each lesson. So although not every notebook needs all the libraries that are in the requirements file, they can all be run with the same environment. You only need to create one environment (best is in the outermost folder where the requirements file is located) and when you activate the environment you can change the working directory and run all the python scripts. You do not need to copy the file into other folders and you do not need to create separate environments for different lessons. If any of the notebooks needs other libraries it will be stated and/or another requirements file will be provided.

1 Like