added docker volumes for faster development
This commit is contained in:
parent
653684807a
commit
773c1fd765
27 changed files with 14 additions and 21 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
build/deb-rust-proto-interface/rust-proto-interface_safecopy
|
||||
build/rust-proto-fastapi-server/Prototyp_safecopy
|
|
@ -10,7 +10,7 @@ RUN echo "deb http://archive.debian.org/debian stretch main contrib non-free" >
|
|||
RUN apt-get update && apt-get install -y \
|
||||
build-essential checkinstall zlib1g-dev pkg-config libssl1.0-dev -y
|
||||
|
||||
COPY rust-proto-interface rust-proto-interface
|
||||
#COPY rust-proto-interface rust-proto-interface
|
||||
|
||||
WORKDIR /opt/rust-proto-interface
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"it": "basabuuka"
|
||||
},
|
||||
"index_title2": {
|
||||
"en": "Open Language?",
|
||||
"en": "Open Language!",
|
||||
"fr": "ouvrir la langue?",
|
||||
"de": "Sprache oeffnen?",
|
||||
"it": "Aprire le lingue?"
|
||||
|
|
|
@ -147,7 +147,8 @@
|
|||
if (xhr1.readyState == 4) {
|
||||
|
||||
result = xhr1.response.split('?&?&')
|
||||
document.getElementById("output1").value = result[0].substring(3, result[0].length);
|
||||
|
||||
document.getElementById("output1").value = result[0].substring(3, result[0].length).replace(/\n/g, "<br>");
|
||||
document.getElementById("output2").value = result[1].substring(0, result[1].length - 3);
|
||||
document.getElementById("datextarea").value = text;
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -11,7 +11,7 @@ FROM tensorflow/tensorflow:2.2.0-gpu
|
|||
|
||||
#USER pluritonian
|
||||
|
||||
WORKDIR /home/pluritonian
|
||||
WORKDIR /home/pluritonian/Prototyp
|
||||
|
||||
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||
|
||||
|
@ -29,7 +29,7 @@ RUN python -m spacy download de_core_news_sm
|
|||
|
||||
RUN pip install --upgrade pip && pip install fastapi uvicorn[standard]
|
||||
|
||||
COPY Prototyp/* /home/pluritonian/
|
||||
#COPY Prototyp/* /home/pluritonian/
|
||||
|
||||
|
||||
# to let the container running:
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -62,20 +62,8 @@ async def root(data: Request):
|
|||
|
||||
output = prototype.translate(text)
|
||||
|
||||
print(output)
|
||||
|
||||
outputlist = output.split(" ")
|
||||
rezponse = ''
|
||||
sentence = ''
|
||||
for word in outputlist:
|
||||
|
||||
sentence += word
|
||||
|
||||
if '.' or '!' or '?' in word:
|
||||
rezponse += sentence + ' \n '
|
||||
sentence = ''
|
||||
|
||||
daresponse = output + '?&?&' + rezponse
|
||||
daresponse = output + '?&?&' + "Future Input"
|
||||
|
||||
|
||||
return JSONResponse(content=daresponse)
|
||||
|
|
|
@ -111,7 +111,7 @@ if len(outsentences) == len(punctuations):
|
|||
for n in range(len(outsentences)):
|
||||
outsentence = outsentences[n]
|
||||
outsentence[0] = outsentence[0].title()
|
||||
out += ' '.join(outsentence) + punctuations[n] + '\n'
|
||||
out += ' '.join(outsentence) + punctuations[n] + '<br>'
|
||||
|
||||
|
||||
print(out)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.1'
|
||||
|
||||
|
||||
services:
|
||||
|
||||
|
@ -8,6 +6,8 @@ services:
|
|||
build: ../build/rust-proto-fastapi-server
|
||||
container_name: rust-proto-fastapi-server
|
||||
restart: always
|
||||
volumes:
|
||||
- ../build/rust-proto-fastapi-server/Prototyp:/home/pluritonian/Prototyp
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
|
@ -20,6 +20,8 @@ services:
|
|||
build: ../build/deb-rust-proto-interface
|
||||
container_name: deb-rust-proto-interface
|
||||
restart: always
|
||||
volumes:
|
||||
- ../build/deb-rust-proto-interface/rust-proto-interface:/opt/rust-proto-interface
|
||||
environment:
|
||||
- RUST_BACKTRACE=full
|
||||
ports:
|
||||
|
|
Loading…
Reference in a new issue