Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. FROM buildpack-deps:buster
  2.  
  3. ARG VERSION=master
  4.  
  5. ARG DEBIAN_FRONTEND=noninteractive
  6.  
  7. ENV PATH /usr/local/bin:$PATH
  8. ENV KENDRYTE_VERSION 8.2.0-20190409
  9.  
  10. RUN apt-get update \
  11. && apt-get install -y make unrar-free autoconf automake libtool gcc g++ gperf \
  12. flex bison texinfo gawk ncurses-dev libexpat-dev python3-dev python3 python3-pip \
  13. sed git unzip bash help2man wget bzip2 build-essential libtool cmake
  14.  
  15. RUN apt-get clean \
  16. && rm -rf /var/lib/apt/lists/* \
  17. && useradd micropython
  18.  
  19. RUN mkdir /opt/kendryte-toolchain
  20. RUN chmod 775 /opt/kendryte-toolchain
  21.  
  22. RUN wget -O /tmp/kendryte-toolchain-ubuntu-amd64-$KENDRYTE_VERSION.tar.xz http://dl.cdn.sipeed.com/kendryte-toolchain-ubuntu-amd64-$KENDRYTE_VERSION.tar.xz
  23. RUN tar -Jxvf /tmp/kendryte-toolchain-ubuntu-amd64-$KENDRYTE_VERSION.tar.xz -C /opt \
  24. && rm /tmp/kendryte-toolchain-ubuntu-amd64-$KENDRYTE_VERSION.tar.xz
  25.  
  26. RUN update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
  27. RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
  28.  
  29. # WORKDIR /usr/src/app
  30. # RUN pip install pyserial
  31. COPY requirements.txt ./
  32. RUN pip3 install --no-cache-dir --requirement ./requirements.txt
  33. RUN pip3 install --upgrade pip
  34.  
  35. USER micropython
  36.  
  37. ENV PATH=/opt/kendryte-toolchain/bin:$PATH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement