Browse Source

added docker volumes for faster development

master
alpcentaur 1 week ago
parent
commit
773c1fd765
27 changed files with 14 additions and 21 deletions
  1. +2
    -0
      .gitignore
  2. +1
    -1
      build/deb-rust-proto-interface/Dockerfile
  3. +1
    -1
      build/deb-rust-proto-interface/rust-proto-interface/lang.json
  4. +2
    -1
      build/deb-rust-proto-interface/rust-proto-interface/templates/index.html
  5. BIN
      build/rust-proto-fastapi-server/.Dockerfile.swp
  6. +2
    -2
      build/rust-proto-fastapi-server/Dockerfile
  7. BIN
      build/rust-proto-fastapi-server/Prototyp/DataBaseOneZeroshkldbMedio1.hkl
  8. BIN
      build/rust-proto-fastapi-server/Prototyp/DataBaseOneZeroshkldbMedio2.hkl
  9. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/ConjunctSolve.cpython-36.pyc
  10. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/FASTsearch.cpython-36.pyc
  11. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/FremdWB.cpython-36.pyc
  12. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/GS_Utils.cpython-36.pyc
  13. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/GenitivSolve.cpython-36.pyc
  14. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/Medio.cpython-36.pyc
  15. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/Passiv2Aktiv.cpython-36.pyc
  16. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/PrototypeAllChained.cpython-36.pyc
  17. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/SayYes.cpython-36.pyc
  18. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/SentGlue.cpython-36.pyc
  19. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/SentSeg.cpython-36.pyc
  20. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/SolveShorts.cpython-36.pyc
  21. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/fastapi_server.cpython-36.pyc
  22. BIN
      build/rust-proto-fastapi-server/Prototyp/__pycache__/oi.cpython-36.pyc
  23. BIN
      build/rust-proto-fastapi-server/Prototyp/bagofwordshkldbMedio1.pkl
  24. BIN
      build/rust-proto-fastapi-server/Prototyp/bagofwordshkldbMedio2.pkl
  25. +1
    -13
      build/rust-proto-fastapi-server/Prototyp/fastapi_server.py
  26. +1
    -1
      build/rust-proto-fastapi-server/Prototyp/prototype_all_chained.py
  27. +4
    -2
      compose/docker-compose.yml

+ 2
- 0
.gitignore View File

@ -0,0 +1,2 @@
build/deb-rust-proto-interface/rust-proto-interface_safecopy
build/rust-proto-fastapi-server/Prototyp_safecopy

+ 1
- 1
build/deb-rust-proto-interface/Dockerfile View File

@ -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

+ 1
- 1
build/deb-rust-proto-interface/rust-proto-interface/lang.json View File

@ -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?"

+ 2
- 1
build/deb-rust-proto-interface/rust-proto-interface/templates/index.html View File

@ -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;
};

BIN
build/rust-proto-fastapi-server/.Dockerfile.swp View File


+ 2
- 2
build/rust-proto-fastapi-server/Dockerfile View File

@ -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:

BIN
build/rust-proto-fastapi-server/Prototyp/DataBaseOneZeroshkldbMedio1.hkl View File


BIN
build/rust-proto-fastapi-server/Prototyp/DataBaseOneZeroshkldbMedio2.hkl View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/ConjunctSolve.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/FASTsearch.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/FremdWB.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/GS_Utils.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/GenitivSolve.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/Medio.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/Passiv2Aktiv.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/PrototypeAllChained.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/SayYes.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/SentGlue.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/SentSeg.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/SolveShorts.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/fastapi_server.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/__pycache__/oi.cpython-36.pyc View File


BIN
build/rust-proto-fastapi-server/Prototyp/bagofwordshkldbMedio1.pkl View File


BIN
build/rust-proto-fastapi-server/Prototyp/bagofwordshkldbMedio2.pkl View File


+ 1
- 13
build/rust-proto-fastapi-server/Prototyp/fastapi_server.py View File

@ -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)

+ 1
- 1
build/rust-proto-fastapi-server/Prototyp/prototype_all_chained.py View File

@ -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)

+ 4
- 2
compose/docker-compose.yml View File

@ -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…
Cancel
Save