Skip to content

Commit

Permalink
Update docker-compose
Browse files Browse the repository at this point in the history
All engines need to have different names, even if they are in different controllers.  Calling Echo for word alignment, echo-word-alignment.
  • Loading branch information
johnml1135 committed Oct 9, 2024
1 parent 5f1b25d commit d0b4534
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
9 changes: 9 additions & 0 deletions docker-compose.withatlas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ services:
- ASPNETCORE_Translation__Engines__1__Address=http://machine-engine
- ASPNETCORE_Translation__Engines__2__Type=Nmt
- ASPNETCORE_Translation__Engines__2__Address=http://machine-engine
- ASPNETCORE_WordAlignment__Engines__0__Type=EchoWordAlignment
- ASPNETCORE_WordAlignment__Engines__0__Address=http://echo
- ASPNETCORE_WordAlignment__Engines__1__Type=Statistical
- ASPNETCORE_WordAlignment__Engines__1__Address=http://machine-engine
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
- 81
Expand Down Expand Up @@ -51,6 +56,8 @@ services:
- ASPNETCORE_Kestrel__Endpoints__Http__Url=http://*:80
- ASPNETCORE_Kestrel__EndpointDefaults__Protocols=Http2
- ASPNETCORE_ConnectionStrings__TranslationPlatformApi=http://serval-api:81
- ASPNETCORE_ConnectionStrings__WordAlignmentPlatformApi=http://serval-api:81
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
ports:
Expand Down Expand Up @@ -95,6 +102,7 @@ services:
- SharedFile__Uri=s3://silnlp/docker-compose/
- "SharedFile__S3AccessKeyId=${AWS_ACCESS_KEY_ID:?access key needed}"
- "SharedFile__S3SecretAccessKey=${AWS_SECRET_ACCESS_KEY:?secret key needed}"
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
ports:
Expand Down Expand Up @@ -139,6 +147,7 @@ services:
- SharedFile__Uri=s3://silnlp/docker-compose/
- "SharedFile__S3AccessKeyId=${AWS_ACCESS_KEY_ID:?access key needed}"
- "SharedFile__S3SecretAccessKey=${AWS_SECRET_ACCESS_KEY:?secret key needed}"
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
ports:
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ services:
- ASPNETCORE_Translation__Engines__1__Address=http://machine-engine
- ASPNETCORE_Translation__Engines__2__Type=Nmt
- ASPNETCORE_Translation__Engines__2__Address=http://machine-engine
- ASPNETCORE_WordAlignment__Engines__0__Type=EchoWordAlignment
- ASPNETCORE_WordAlignment__Engines__0__Address=http://echo
- ASPNETCORE_WordAlignment__Engines__1__Type=Statistical
- ASPNETCORE_WordAlignment__Engines__1__Address=http://machine-engine
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
Expand Down Expand Up @@ -53,6 +57,7 @@ services:
- ASPNETCORE_Kestrel__Endpoints__Http__Url=http://*:80
- ASPNETCORE_Kestrel__EndpointDefaults__Protocols=Http2
- ASPNETCORE_ConnectionStrings__TranslationPlatformApi=http://serval-api:81
- ASPNETCORE_ConnectionStrings__WordAlignmentPlatformApi=http://serval-api:81
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Translation": {
"Engines": [
{
"Type": "EchoTranslation",
"Type": "Echo",
"Address": "http://localhost:8055"
},
{
Expand Down
16 changes: 8 additions & 8 deletions src/Serval/src/Serval.Client/Client.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7599,11 +7599,11 @@ public partial interface IWordAlignmentEnginesClient
/// <br/> * The name does not have to be unique, as the engine is uniquely identified by the auto-generated id
/// <br/>* **sourceLanguage**: The source language code (a valid [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) is recommended)
/// <br/>* **targetLanguage**: The target language code (a valid IETF language tag is recommended)
/// <br/>* **type**: **statistical** or **echo**
/// <br/>* **type**: **statistical** or **echo-word-alignment**
/// <br/>### statistical
/// <br/>The Statistical engine is based off of the [Thot library](https://github.com/sillsdev/thot) and contains IBM-1, IBM-2, IBM-3, IBM-4, FastAlign and HMM algorithms.
/// <br/>### echo
/// <br/>The echo engine has full coverage of all endpoints. Endpoints like create and build return empty responses.
/// <br/>### echo-word-alignment
/// <br/>The echo-word-alignment engine has full coverage of all endpoints. Endpoints like create and build return empty responses.
/// <br/>Endpoints like get-word-alignment echo the sent content back to the user in the proper format. This engine is useful for debugging and testing purposes.
/// <br/>## Sample request:
/// <br/>
Expand Down Expand Up @@ -7975,11 +7975,11 @@ public string BaseUrl
/// <br/> * The name does not have to be unique, as the engine is uniquely identified by the auto-generated id
/// <br/>* **sourceLanguage**: The source language code (a valid [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) is recommended)
/// <br/>* **targetLanguage**: The target language code (a valid IETF language tag is recommended)
/// <br/>* **type**: **statistical** or **echo**
/// <br/>* **type**: **statistical** or **echo-word-alignment**
/// <br/>### statistical
/// <br/>The Statistical engine is based off of the [Thot library](https://github.com/sillsdev/thot) and contains IBM-1, IBM-2, IBM-3, IBM-4, FastAlign and HMM algorithms.
/// <br/>### echo
/// <br/>The echo engine has full coverage of all endpoints. Endpoints like create and build return empty responses.
/// <br/>### echo-word-alignment
/// <br/>The echo-word-alignment engine has full coverage of all endpoints. Endpoints like create and build return empty responses.
/// <br/>Endpoints like get-word-alignment echo the sent content back to the user in the proper format. This engine is useful for debugging and testing purposes.
/// <br/>## Sample request:
/// <br/>
Expand Down Expand Up @@ -9882,7 +9882,7 @@ public partial interface IWordAlignmentEngineTypesClient
/// <summary>
/// Get queue information for a given engine type
/// </summary>
/// <param name="engineType">A valid engine type: smt-transfer, nmt, or echo</param>
/// <param name="engineType">A valid engine type: statistical or echo-word-alignment</param>
/// <returns>Queue information for the specified engine type</returns>
/// <exception cref="ServalApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<Queue> GetQueueAsync(string engineType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
Expand Down Expand Up @@ -9941,7 +9941,7 @@ public string BaseUrl
/// <summary>
/// Get queue information for a given engine type
/// </summary>
/// <param name="engineType">A valid engine type: smt-transfer, nmt, or echo</param>
/// <param name="engineType">A valid engine type: statistical or echo-word-alignment</param>
/// <returns>Queue information for the specified engine type</returns>
/// <exception cref="ServalApiException">A server side error occurred.</exception>
public virtual async System.Threading.Tasks.Task<Queue> GetQueueAsync(string engineType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class WordAlignmentEngineTypesController(IAuthorizationService authServic
/// <summary>
/// Get queue information for a given engine type
/// </summary>
/// <param name="engineType">A valid engine type: smt-transfer, nmt, or echo</param>
/// <param name="engineType">A valid engine type: statistical or echo-word-alignment</param>
/// <param name="cancellationToken"></param>
/// <response code="200">Queue information for the specified engine type</response>
/// <response code="401">The client is not authenticated</response>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ CancellationToken cancellationToken
/// * The name does not have to be unique, as the engine is uniquely identified by the auto-generated id
/// * **sourceLanguage**: The source language code (a valid [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) is recommended)
/// * **targetLanguage**: The target language code (a valid IETF language tag is recommended)
/// * **type**: **statistical** or **echo**
/// * **type**: **statistical** or **echo-word-alignment**
/// ### statistical
/// The Statistical engine is based off of the [Thot library](https://github.com/sillsdev/thot) and contains IBM-1, IBM-2, IBM-3, IBM-4, FastAlign and HMM algorithms.
/// ### echo
/// The echo engine has full coverage of all endpoints. Endpoints like create and build return empty responses.
/// ### echo-word-alignment
/// The echo-word-alignment engine has full coverage of all endpoints. Endpoints like create and build return empty responses.
/// Endpoints like get-word-alignment echo the sent content back to the user in the proper format. This engine is useful for debugging and testing purposes.
/// ## Sample request:
///
Expand Down

0 comments on commit d0b4534

Please sign in to comment.