You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Refactored SilNlpEnv in silnlp/common/environment.py to support connection to either MinIO or B2
-Kept in support for AWS temporarily
-Updated readme and other documentation to show instructions on MinIO and B2 bucket setup
* If you do not intend to use SILNLP with ClearML and/or AWS, you can leave out the respective variables. If you need to generate ClearML credentials, see [ClearML setup](clear_ml_setup.md).
73
-
* Note that this does not give you direct access to an AWS S3 bucket from within the Docker container, it only allows you to run scripts referencing files in the bucket.
* If you do not intend to use SILNLP with ClearML and/or B2/MinIO, you can leave out the respective variables. If you need to generate ClearML credentials, see [ClearML setup](clear_ml_setup.md).
75
+
* Note that this does not give you direct access to a B2 or MinIO bucket from within the Docker container, it only allows you to run scripts referencing files in the bucket.
74
76
75
77
6. Start container
76
78
@@ -129,22 +131,24 @@ These are the main requirements for the SILNLP code to run on a local machine. S
129
131
poetry install
130
132
```
131
133
132
-
10. If using ClearML and/or AWS, set the following environment variables:
134
+
10. If using ClearML and/or B2/MinIO, set the following environment variables:
* If you need to generate ClearML credentials, see [ClearML setup](clear_ml_setup.md).
143
-
* Note that this does not give you direct access to an AWS S3 bucket from within the Docker container, it only allows you to run scripts referencing files in the bucket.
147
+
* Note that this does not give you direct access to a B2 or MinIO bucket from within the Docker container, it only allows you to run scripts referencing files in the bucket.
144
148
* For instructions on how to permanently set up environment variables for your operating system, see the corresponding section under the Development Environment Setup header below.
145
149
146
-
11. If using AWS, there are two options:
147
-
* Option 1: Mount the bucket to your filesystem following the instructions under [Install and Configure Rclone](https://github.com/sillsdev/silnlp/blob/master/s3_bucket_setup.md#install-and-configure-rclone).
150
+
11. If using B2/MinIO, there are two options:
151
+
* Option 1: Mount the bucket to your filesystem following the instructions under [Install and Configure Rclone](https://github.com/sillsdev/silnlp/blob/master/bucket_setup.md#install-and-configure-rclone).
148
152
* Option 2: Create a local cache for the bucket following the instructions under [Create SILNLP cache](https://github.com/sillsdev/silnlp/blob/master/manual_setup.md#create-silnlp-cache).
149
153
150
154
## Development Environment Setup
@@ -177,7 +181,7 @@ Follow the instructions below to set up a Dev Container in VS Code. This is the
177
181
178
182
4. Define environment variables.
179
183
180
-
Set the following environment variables with your respective credentials: CLEARML_API_ACCESS_KEY, CLEARML_API_SECRET_KEY, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY. Additionally, set AWS_REGION. The typical value is "us-east-1".
184
+
Set the following environment variables with your respective credentials: CLEARML_API_ACCESS_KEY, CLEARML_API_SECRET_KEY, B2_KEY_ID, B2_APPLICATION_KEY, MINIO_ACCESS_KEY, MINIO_SECRET_KEY. Also set B2_ENDPOINT_URL to https://s3.us-east-005.backblazeb2.com and set MINIO_ENDPOINT_URL to https://truenas.psonet.languagetechnology.org:9000 with no quotations.
181
185
* Linux / macOS users: To set environment variables permanently, add each variable as a new line to the `.bashrc` file (Linux) or `.profile` file (macOS) in your home directory with the format
182
186
```
183
187
export VAR="VAL"
@@ -210,7 +214,7 @@ Follow the instructions below to set up a Dev Container in VS Code. This is the
210
214
10. Install and activate Poetry environment.
211
215
* In the VS Code terminal, run `poetry install` to install the necessary Python libraries, and then run `poetry shell` to enter the environment in the terminal.
212
216
213
-
11. (Optional) Locally mount the S3 bucket. This will allow you to interact directly with the S3 bucket from your local terminal (outside of the dev container). See instructions [here](s3_bucket_setup.md).
217
+
11. (Optional) Locally mount the B2 and/or MinIO bucket(s). This will allow you to interact directly with the bucket(s) from your local terminal (outside of the dev container). See instructions [here](bucket_setup.md).
214
218
215
219
To get back into the dev container and poetry environment each subsequent time, open the silnlp folder in VS Code, select the "Reopen in Container" option from the Remote Connection menu (bottom left corner), and use the `poetry shell` command in the terminal.
* Unzip to your desktop (or some convient location).
17
+
* Add the folder that contains rclone.exe to your PATH environment variable.
18
+
* Take the `scripts/rclone/rclone.conf` file from this SILNLP repo and copy it to `~\AppData\Roaming\rclone` (creating folders if necessary)
19
+
* Add your credentials in the appropriate fields in `~\AppData\Roaming\rclone`
20
+
* Take the `scripts/rclone/mount_b2_to_b.bat` and `scripts/rclone/mount_minio_to_m.bat` file from this SILNLP repo and copy it to the folder that contains the unzipped rclone.
21
+
* Double-click either bat file. A command window should open and remain open. You should see something like, if running mount_b2_to_b.bat:
22
+
```
23
+
C:\Users\David\Software\rclone>call rclone mount --vfs-cache-mode full --use-server-modtime b2silnlp:silnlp B:
24
+
The service rclone has been started.
25
+
```
26
+
27
+
**Linux / macOS**
28
+
29
+
The following will mount /silnlp to a B folder or /nlp-research to a M folder in your home directory and allow you to explore, read and write.
30
+
* For macOS, first download and install macFUSE: https://osxfuse.github.io/
* Take the `scripts/rclone/rclone.conf` file from this SILNLP repo and copy it to `~/.config/rclone/rclone.conf` (creating folders if necessary)
33
+
* Add your credentials in the appropriate fields in `~/.config/rclone/rclone.conf`
34
+
* Create a folder called "B" or "M" in your user directory
35
+
* Run the following command for B2:
36
+
```
37
+
rclone mount --vfs-cache-mode full --use-server-modtime b2silnlp:silnlp ~/B
38
+
```
39
+
* OR run the following command for MinIO:
40
+
```
41
+
rclone mount --vfs-cache-mode full --use-server-modtime miniosilnlp:nlp-research ~/M
42
+
```
43
+
### To start B: and/or M: drive on start up
44
+
45
+
**Windows**
46
+
47
+
Put a shortcut to the mount_b2_to_b.bat and/or mount_minio_to_m.bat file in the Startup folder.
48
+
* In Windows Explorer put `shell:startup` in the address bar or open `C:\Users\<Username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup`
49
+
* Right click to add a new shortcut. Choose `mount_b2_to_b.bat` and/or `mount_minio_to_m.bat` as the target, you can leave the name as the default.
50
+
51
+
Now your B2 and/or MinIO bucket should be mounted as B: or M: drive, respectively, when you start Windows.
52
+
53
+
**Linux / macOS**
54
+
* Run `crontab -e`
55
+
* For B2, paste `@reboot rclone mount --vfs-cache-mode full --use-server-modtime b2silnlp:silnlp ~/B` into the file, save and exit
56
+
* For MinIO, paste `@reboot rclone mount --vfs-cache-mode full --use-server-modtime miniosilnlp:nlp-research ~/M` into the file, save and exit
57
+
* Reboot Linux / macOS
58
+
59
+
Now your B2 and/or MinIO bucket should be mounted as ~/B or ~/M respectively when you start Linux / macOS.
Copy file name to clipboardExpand all lines: manual_setup.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,9 +73,9 @@ __Download and install__ the following before creating any projects or starting
73
73
"editor.formatOnSave": true,
74
74
```
75
75
76
-
### S3 bucket setup
76
+
### B2 and/or MinIO bucket(s) setup
77
77
78
-
See [S3 bucket setup](s3_bucket_setup.md).
78
+
See [Bucket setup](bucket_setup.md).
79
79
80
80
### ClearML setup
81
81
@@ -88,8 +88,10 @@ See [ClearML setup](clear_ml_setup.md).
88
88
* Create the directory "$HOME/.cache/silnlp/projects" and set the environment variable SIL_NLP_CACHE_PROJECT_DIR to that path.
89
89
90
90
### Additional Environment Variables
91
-
* Set the following environment variables with your respective credentials: CLEARML_API_ACCESS_KEY, CLEARML_API_SECRET_KEY, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY.
92
-
* Set SIL_NLP_DATA_PATH to "/silnlp" and CLEARML_API_HOST to "https://api.sil.hosted.allegro.ai".
91
+
* Set the following environment variables with your respective credentials: CLEARML_API_ACCESS_KEY, CLEARML_API_SECRET_KEY, B2_KEY_ID, B2_APPLICATION_KEY, MINIO_ACCESS_KEY, MINIO_SECRET_KEY.
92
+
* Set CLEARML_API_HOST to "https://api.sil.hosted.allegro.ai".
93
+
* Set B2_ENDPOINT_URL to https://s3.us-east-005.backblazeb2.com
94
+
* Set MINIO_ENDPOINT_URL to https://truenas.psonet.languagetechnology.org:9000
0 commit comments