Include a Pycharm config file (#302)
- Updated the WSL documentation to fix Ubuntu 20.04 - Simplified environment setup
This commit is contained in:
Родитель
a68b151242
Коммит
9a0680e354
|
@ -136,7 +136,6 @@ dmypy.json
|
|||
.idea/inspectionProfiles/profiles_settings.xml
|
||||
.idea/misc.xml
|
||||
.idea/mypy.xml
|
||||
.idea/InnerEye-DeepLearning.iml
|
||||
.idea/workspace.xml
|
||||
.idea/deployment.xml
|
||||
InnerEyeTestVariables.txt
|
||||
|
@ -149,7 +148,6 @@ Tests/ML/test_outputs
|
|||
/.vs/ProjectSettings.json
|
||||
/.idea/dictionaries
|
||||
/.idea/pylint.xml
|
||||
/.idea/InnerEye-DeepLearning.iml
|
||||
# Temp file that is generated if setup.py is run locally
|
||||
/package_version.txt
|
||||
# Test output from model registration
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="3.7 @ Ubuntu 20.04" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PackageRequirementsSettings">
|
||||
<option name="requirementsPath" value="" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
<component name="TestRunnerService">
|
||||
<option name="PROJECT_TEST_RUNNER" value="pytest" />
|
||||
</component>
|
||||
</module>
|
18
docs/WSL.md
18
docs/WSL.md
|
@ -19,31 +19,33 @@ You can also find a video walkthrough of WSL2+CUDA installation here: https://ch
|
|||
Requirements: Windows 10 version 2004 or higher
|
||||
|
||||
The instructions are [here](https://docs.microsoft.com/en-us/windows/wsl/install-win10), but summarized in
|
||||
copy/paste-able form below.
|
||||
copy/paste-able form below. When installing via the UI, pick Ubuntu version 20.04 LTS as your distribution.
|
||||
|
||||
Install winget from the appxbundle at https://github.com/microsoft/winget-cli/releases
|
||||
To use the commandline setup, please first install
|
||||
[winget via the appxbundle](https://github.com/microsoft/winget-cli/releases).
|
||||
|
||||
On PowerShell as Administrator:
|
||||
Then, in PowerShell as Administrator:
|
||||
```
|
||||
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
|
||||
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
|
||||
wsl --set-default-version 2
|
||||
winget install ubuntu
|
||||
winget install ubuntu --version 20.04
|
||||
wsl --list --verbose
|
||||
wsl --set-version <distribution name> <versionNumber>
|
||||
wsl --set-version Ubuntu-20.04 2
|
||||
wsl --set-default-version 2
|
||||
winget install Microsoft.WindowsTerminal
|
||||
```
|
||||
|
||||
Remember to restart your machine if you were doing a fresh installation of WSL 2 before trying further steps.
|
||||
|
||||
Since it is possible to choose the version of WSL that a particular distribution is running, once you have WSL2 installed, ensure that your distribution is running on top of WSL2 by executing
|
||||
Since it is possible to choose the version of WSL that a particular distribution is running,
|
||||
once you have WSL2 installed, ensure that your distribution is running on top of WSL2 by executing
|
||||
`wsl --list --verbose`
|
||||
If all is good, the output should look like this:
|
||||
```
|
||||
$> wsl --list -v
|
||||
NAME STATE VERSION
|
||||
* Ubuntu Running 2
|
||||
NAME STATE VERSION
|
||||
* Ubuntu-20.04 Running 2
|
||||
```
|
||||
Note the "2" in Version column.
|
||||
|
||||
|
|
|
@ -137,34 +137,14 @@ The following steps describe how to set up specific tools. You can execute most
|
|||
point, if you want to dig deeper into the code.
|
||||
|
||||
## PyCharm
|
||||
- Our team uses [PyCharm](https://www.jetbrains.com/pycharm/) for development.
|
||||
- Add the contents listed just below in file `InnerEye-DeepLearning.iml` in the `.idea` folder in the repo.
|
||||
This will configure the interpreter and modules for PyCharm.
|
||||
- Change the jdkName to your WSL interpreter. At the moment there is no way to change the name of the interpreter for WSL.
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="3.7 @ Ubuntu" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PackageRequirementsSettings">
|
||||
<option name="requirementsPath" value="" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
<component name="TestRunnerService">
|
||||
<option name="PROJECT_TEST_RUNNER" value="pytest" />
|
||||
</component>
|
||||
</module>
|
||||
```
|
||||
- To make sure operations such as git clean do not remove this file, you can add our `deepclean` alias to your local
|
||||
git config by applying our git configurations: `git config --local include.path ../.gitconfig`
|
||||
|
||||
Our team uses [PyCharm](https://www.jetbrains.com/pycharm/) for development, but any good editor
|
||||
([VSCode](https://code.visualstudio.com/) for example) will do as well.
|
||||
|
||||
This repository already contains a PyCharm configuration file in `.idea/InnerEye-DeepLearning.iml`. It will pick the
|
||||
WSL Python interpreter (see [WSL.md](WSL.md)) as the default - based on your configuration, you will need to adjust
|
||||
that as described [here](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html).
|
||||
|
||||
|
||||
## How to manually set up flake8 as a PyCharm external tool
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче