|
1 | 1 | Working in a command line environment is recommended for ease of use with git and dvc. If on Windows, WSL1 or 2 is recommended. |
2 | 2 |
|
3 | 3 | # Environment Set up |
4 | | -* Download and install conda if you don’t have it already. |
5 | | - * Use the supplied requirements file to create a new environment, or |
6 | | - * conda create -n [envname] "python=3.8" scikit-learn dvc pandas numpy pytest jupyter jupyterlab fastapi uvicorn -c conda-forge |
7 | | - * Install git either through conda (“conda install git”) or through your CLI, e.g. sudo apt-get git. |
| 4 | +* **Option 1: Using pip and venv (Recommended)** |
| 5 | + * Ensure you have Python 3.13 installed |
| 6 | + * Create virtual environment: `python3.13 -m venv .venv` |
| 7 | + * Activate environment: `source .venv/bin/activate` (On Windows: `.venv\Scripts\activate`) |
| 8 | + * Install dependencies: `pip install -r requirements.txt` |
| 9 | + |
| 10 | +* **Option 2: Using conda** |
| 11 | + * Download and install conda if you don't have it already. |
| 12 | + * conda create -n [envname] "python=3.13" scikit-learn dvc pandas numpy pytest jupyter jupyterlab fastapi uvicorn pydantic httpx matplotlib seaborn -c conda-forge |
| 13 | + * Install git either through conda ("conda install git") or through your CLI, e.g. sudo apt-get git. |
8 | 14 |
|
9 | 15 | ## Repositories |
10 | 16 |
|
@@ -32,7 +38,8 @@ To use your new S3 bucket from the AWS CLI you will need to create an IAM user w |
32 | 38 | ## GitHub Actions |
33 | 39 |
|
34 | 40 | * Setup GitHub Actions on your repository. You can use one of the pre-made GitHub Actions if at a minimum it runs pytest and flake8 on push and requires both to pass without error. |
35 | | - * Make sure you set up the GitHub Action to have the same version of Python as you used in development. |
| 41 | + * Make sure you set up the GitHub Action to use Python 3.13 (same version as development). |
| 42 | + * Note: Add flake8 to requirements.txt if you want to use it for linting: `pip install flake8` |
36 | 43 | * Add your <a href="https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions" target="_blank">AWS credentials to the Action</a>. |
37 | 44 | * Set up <a href="https://github.com/iterative/setup-dvc" target="_blank">DVC in the action</a> and specify a command to `dvc pull`. |
38 | 45 |
|
@@ -70,6 +77,7 @@ To use your new S3 bucket from the AWS CLI you will need to create an IAM user w |
70 | 77 | * Enable automatic deployments that only deploy if your continuous integration passes. |
71 | 78 | * Hint: think about how paths will differ in your local environment vs. on Heroku. |
72 | 79 | * Hint: development in Python is fast! But how fast you can iterate slows down if you rely on your CI/CD to fail before fixing an issue. I like to run flake8 locally before I commit changes. |
| 80 | + * Note: Install flake8 separately if needed: `pip install flake8` |
73 | 81 | * Set up DVC on Heroku using the instructions contained in the starter directory. |
74 | 82 | * Set up access to AWS on Heroku, if using the CLI: `heroku config:set AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=yyy` |
75 | 83 | * Write a script that uses the requests module to do one POST on your live API. |
0 commit comments