You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.5 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. FROM python:3.7
  2. WORKDIR /project
  3. # Install Python dependencies with apt to ease arm installation
  4. RUN apt-get update && apt-get install -y git libatlas-base-dev gfortran python3-grpcio python3-scipy python3-numpy python3-sklearn python3-llvmlite python3-cffi python3-audioread python3-numba
  5. # Set python path so it can see the debian packages
  6. ENV PYTHONPATH "${PYTHONPATH}":"/usr/lib/python3/dist-packages/"
  7. # Clone tacotron and squeezewave into the container
  8. RUN git clone -q --recursive https://git.technicalincompetence.club/dan/tacotron2.git
  9. RUN git clone https://git.technicalincompetence.club/dan/fastspeech_squeezewave.git
  10. # Copy our files
  11. COPY synthesize.py .
  12. COPY merged.dict_1.1.txt .
  13. COPY requirements.txt .
  14. # Multiplatform work
  15. ARG TARGETPLATFORM
  16. ARG BUILDPLATFORM
  17. RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
  18. ## Copy python wheels for torch and tensorflow so arm can install them properly
  19. COPY arm_wheels/tensorflow-1.14.0-cp37-none-linux_aarch64.whl .
  20. COPY arm_wheels/torch-1.4.0a0+7f73f1d-cp37-cp37m-linux_aarch64.whl .
  21. ### Install tensorflow
  22. #RUN if [ "x$TARGETPLATFORM" = "xlinux/arm64" ] ; then pip install tensorflow-1.14.0-cp37-none-linux_aarch64.whl; rm tensorflow-1.14.0-cp37-none-linux_aarch64.whl; else pip install tensorflow==1.14.0; fi
  23. ### Install pytorch
  24. RUN if [ "x$TARGETPLATFORM" = "xlinux/arm64" ] ; then pip install torch-1.4.0a0+7f73f1d-cp37-cp37m-linux_aarch64.whl; rm torch-1.4.0a0+7f73f1d-cp37-cp37m-linux_aarch64.whl; else pip install torch; fi
  25. RUN python3 -m pip install --user -r requirements.txt