Skip to content

Commit

Permalink
Move Dev Container setup to other page
Browse files Browse the repository at this point in the history
  • Loading branch information
Eve-ning committed Dec 27, 2023
1 parent 399fc54 commit e2cab32
Show file tree
Hide file tree
Showing 20 changed files with 108 additions and 77 deletions.
4 changes: 3 additions & 1 deletion Writerside/d.tree
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
start-page="Overview.md">

<toc-element topic="Overview.md"/>
<toc-element topic="Getting-Started.md"/>
<toc-element topic="Getting-Started.md">
<toc-element topic="Get-Started-with-Dev-Containers.md"/>
</toc-element>
<toc-element toc-title="Tutorials">
<toc-element topic="Retrieve-our-Datasets.md"/>
</toc-element>
Expand Down
49 changes: 49 additions & 0 deletions Writerside/topics/Get-Started-with-Dev-Containers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Get Started with Dev Containers

Dev. Containers are a great way to get started with a project. They define all
necessary dependencies and environments, so you can just start coding within
the container.

In this article, we'll only go over **additional steps** to set up with our
project. For more information on how to use Dev Containers, please refer to
the official documentation for each IDE. Once you've set up the Dev Container,
come back here to finish the setup:

- [VSCode](https://code.visualstudio.com/docs/remote/containers).
- [IntelliJ](https://www.jetbrains.com/help/idea/connect-to-devcontainer.html)

> If you see the error `Error response from daemon: ... <!DOCTYPE`, you forgot
> the `.git` at the end of the repo URL.
{style='warning'}

## Python Environment

> Do not create a new environment
{style='warning'}

The dev environment is already created and is managed by Anaconda
`/opt/conda/bin/conda`.
To activate the environment, run the following command:

```bash
conda activate base
```

> Refer to your respective IDE's documentation on how to activate the
> environment.
## Mark as Sources Root (Add to PYTHONPATH)

For `import` statements to work, you need to mark the `src` folder as the
sources root. Optionally, also mark the `tests` folder as the tests root.

> Refer to your respective IDE's documentation on how to mark folders as
> sources root. (Also known as adding to the `PYTHONPATH`)
## Additional Setup

Refer to the [Getting Started](Getting-Started.md) guide for additional setup
steps such as:
- Google Cloud Application Default Credentials
- Weight & Bias API Key
- Label Studio API Key
22 changes: 2 additions & 20 deletions Writerside/topics/Getting-Started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Getting Started

> Want to use a Dev Container? See [Get Started with Dev Containers](Get-Started-with-Dev-Containers.md)
<procedure title="Installing the Dev. Environment" id="install">
<step>Ensure that you have the right version of Python.
The required Python version can be seen in <code>pyproject.toml</code>
Expand Down Expand Up @@ -60,25 +62,6 @@
</step>
</procedure>

<procedure title="Use a Dev. Container" id="install-dev-con">
<tip>
Only use Dev. Containers if you're familiar with your IDEs, it's highly
dependent on clicking around the IDE.
</tip>
<warning>Do not set up a new environment, it'll be included in the environment.</warning>
<step>
Ensure that you have installed pre-requisites for respective IDEs.
<a href="https://code.visualstudio.com/docs/remote/containers#_system-requirements"> VSCode </a>
<a href="https://www.jetbrains.com/help/idea/prerequisites-for-dev-containers.html"> IntelliJ </a>
</step>
<step>Start by cloning our repository.
<code-block lang="shell">
git clone https://github.com/FR-DC/FRDC-ML.git
</code-block>
</step>
<step>Follow steps for respective IDEs to set up the Dev. Container.</step>
<step>Activate the virtual environment. The venv is located in <code>/opt/venv</code></step>
</procedure>

<procedure title="Setting Up Google Cloud" id="gcloud">
<step>
Expand Down Expand Up @@ -132,7 +115,6 @@
</step>
</procedure>


<procedure title="Setting Up Weight and Biases" id="wandb">
<step>
We use W&B to track our experiments. To set up W&B,
Expand Down
2 changes: 1 addition & 1 deletion docs/HelpTOC.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"entities":{"pages":{"Overview":{"id":"Overview","title":"Overview","url":"overview.html","level":0,"tabIndex":0},"Getting-Started":{"id":"Getting-Started","title":"Getting Started","url":"getting-started.html","level":0,"tabIndex":1},"e8e19623_38829":{"id":"e8e19623_38829","title":"Tutorials","level":0,"pages":["Retrieve-our-Datasets"],"tabIndex":2},"Retrieve-our-Datasets":{"id":"Retrieve-our-Datasets","title":"Retrieve our Datasets","url":"retrieve-our-datasets.html","level":1,"parentId":"e8e19623_38829","tabIndex":0},"mix-match":{"id":"mix-match","title":"MixMatch","url":"mix-match.html","level":0,"pages":["mix-match-module","custom-k-aug-dataloaders"],"tabIndex":3},"mix-match-module":{"id":"mix-match-module","title":"MixMatch Module","url":"mix-match-module.html","level":1,"parentId":"mix-match","tabIndex":0},"custom-k-aug-dataloaders":{"id":"custom-k-aug-dataloaders","title":"Custom K-Aug Dataloaders","url":"custom-k-aug-dataloaders.html","level":1,"parentId":"mix-match","tabIndex":1},"e8e19623_38834":{"id":"e8e19623_38834","title":"Model Tests","level":0,"pages":["Model-Test-Chestnut-May-Dec"],"tabIndex":4},"Model-Test-Chestnut-May-Dec":{"id":"Model-Test-Chestnut-May-Dec","title":"Model Test Chestnut May-Dec","url":"model-test-chestnut-may-dec.html","level":1,"parentId":"e8e19623_38834","tabIndex":0},"e8e19623_38836":{"id":"e8e19623_38836","title":"API","level":0,"pages":["load.dataset","load.gcs","preprocessing.scale","preprocessing.extract_segments","preprocessing.morphology","preprocessing.glcm_padded","train.frdc_lightning"],"tabIndex":5},"load.dataset":{"id":"load.dataset","title":"load.dataset","url":"load-dataset.html","level":1,"parentId":"e8e19623_38836","tabIndex":0},"load.gcs":{"id":"load.gcs","title":"load.gcs","url":"load-gcs.html","level":1,"parentId":"e8e19623_38836","tabIndex":1},"preprocessing.scale":{"id":"preprocessing.scale","title":"preprocessing.scale","url":"preprocessing-scale.html","level":1,"parentId":"e8e19623_38836","tabIndex":2},"preprocessing.extract_segments":{"id":"preprocessing.extract_segments","title":"preprocessing.extract_segments","url":"preprocessing-extract-segments.html","level":1,"parentId":"e8e19623_38836","tabIndex":3},"preprocessing.morphology":{"id":"preprocessing.morphology","title":"preprocessing.morphology","url":"preprocessing-morphology.html","level":1,"parentId":"e8e19623_38836","tabIndex":4},"preprocessing.glcm_padded":{"id":"preprocessing.glcm_padded","title":"preprocessing.glcm_padded","url":"preprocessing-glcm-padded.html","level":1,"parentId":"e8e19623_38836","tabIndex":5},"train.frdc_lightning":{"id":"train.frdc_lightning","title":"train.frdc_datamodule \u0026 frdc_module","url":"train-frdc-lightning.html","level":1,"parentId":"e8e19623_38836","tabIndex":6}}},"topLevelIds":["Overview","Getting-Started","e8e19623_38829","mix-match","e8e19623_38834","e8e19623_38836"]}
{"entities":{"pages":{"Overview":{"id":"Overview","title":"Overview","url":"overview.html","level":0,"tabIndex":0},"Getting-Started":{"id":"Getting-Started","title":"Getting Started","url":"getting-started.html","level":0,"tabIndex":1},"e8e19623_38931":{"id":"e8e19623_38931","title":"Tutorials","level":0,"pages":["Retrieve-our-Datasets"],"tabIndex":2},"Retrieve-our-Datasets":{"id":"Retrieve-our-Datasets","title":"Retrieve our Datasets","url":"retrieve-our-datasets.html","level":1,"parentId":"e8e19623_38931","tabIndex":0},"mix-match":{"id":"mix-match","title":"MixMatch","url":"mix-match.html","level":0,"pages":["mix-match-module","custom-k-aug-dataloaders"],"tabIndex":3},"mix-match-module":{"id":"mix-match-module","title":"MixMatch Module","url":"mix-match-module.html","level":1,"parentId":"mix-match","tabIndex":0},"custom-k-aug-dataloaders":{"id":"custom-k-aug-dataloaders","title":"Custom K-Aug Dataloaders","url":"custom-k-aug-dataloaders.html","level":1,"parentId":"mix-match","tabIndex":1},"e8e19623_38936":{"id":"e8e19623_38936","title":"Model Tests","level":0,"pages":["Model-Test-Chestnut-May-Dec"],"tabIndex":4},"Model-Test-Chestnut-May-Dec":{"id":"Model-Test-Chestnut-May-Dec","title":"Model Test Chestnut May-Dec","url":"model-test-chestnut-may-dec.html","level":1,"parentId":"e8e19623_38936","tabIndex":0},"e8e19623_38938":{"id":"e8e19623_38938","title":"API","level":0,"pages":["load.dataset","load.gcs","preprocessing.scale","preprocessing.extract_segments","preprocessing.morphology","preprocessing.glcm_padded","train.frdc_lightning"],"tabIndex":5},"load.dataset":{"id":"load.dataset","title":"load.dataset","url":"load-dataset.html","level":1,"parentId":"e8e19623_38938","tabIndex":0},"load.gcs":{"id":"load.gcs","title":"load.gcs","url":"load-gcs.html","level":1,"parentId":"e8e19623_38938","tabIndex":1},"preprocessing.scale":{"id":"preprocessing.scale","title":"preprocessing.scale","url":"preprocessing-scale.html","level":1,"parentId":"e8e19623_38938","tabIndex":2},"preprocessing.extract_segments":{"id":"preprocessing.extract_segments","title":"preprocessing.extract_segments","url":"preprocessing-extract-segments.html","level":1,"parentId":"e8e19623_38938","tabIndex":3},"preprocessing.morphology":{"id":"preprocessing.morphology","title":"preprocessing.morphology","url":"preprocessing-morphology.html","level":1,"parentId":"e8e19623_38938","tabIndex":4},"preprocessing.glcm_padded":{"id":"preprocessing.glcm_padded","title":"preprocessing.glcm_padded","url":"preprocessing-glcm-padded.html","level":1,"parentId":"e8e19623_38938","tabIndex":5},"train.frdc_lightning":{"id":"train.frdc_lightning","title":"train.frdc_datamodule \u0026 frdc_module","url":"train-frdc-lightning.html","level":1,"parentId":"e8e19623_38938","tabIndex":6}}},"topLevelIds":["Overview","Getting-Started","e8e19623_38931","mix-match","e8e19623_38936","e8e19623_38938"]}
2 changes: 1 addition & 1 deletion docs/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"productVersion":"0.0.7","productId":"d","stage":"release","downloadTitle":"Get Documentation","keymaps":{},"searchMaxHits":75,"productName":"Documentation"}
{"productVersion":"0.0.8","productId":"d","stage":"release","downloadTitle":"Get Documentation","keymaps":{},"searchMaxHits":75,"productName":"Documentation"}
2 changes: 1 addition & 1 deletion docs/current.help.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.7
0.0.8
6 changes: 3 additions & 3 deletions docs/custom-k-aug-dataloaders.html

Large diffs are not rendered by default.

Loading

0 comments on commit e2cab32

Please sign in to comment.