dockerfile-arm64-github-actions 893 B

1234567891011121314151617181920212223242526272829
  1. FROM python:3.10-slim
  2. # copy the source code into the container
  3. COPY . /workdir
  4. # install the necessary dependencies
  5. RUN apt-get update && apt-get install -y \
  6. pkg-config gcc libseccomp-dev wget \
  7. && rm -rf /var/lib/apt/lists/*
  8. # install Go
  9. RUN wget https://go.dev/dl/go1.20.6.linux-arm64.tar.gz -O /opt/go1.20.6.linux-arm64.tar.gz \
  10. && tar zxf /opt/go1.20.6.linux-arm64.tar.gz -C /opt \
  11. && rm /opt/go1.20.6.linux-arm64.tar.gz \
  12. && ln -s /opt/go/bin/go /usr/local/bin/go
  13. # install the necessary Go dependencies
  14. RUN cd /workdir && go mod tidy \
  15. && bash ./build/build_arm64.sh
  16. # install the necessary Python dependencies
  17. RUN pip install httpx requests jinja2
  18. # Link /usr/local/bin/python3 to /usr/bin/python3
  19. RUN ln -s /usr/local/bin/python3 /usr/bin/python3
  20. # run tests
  21. RUN cd /workdir && go test -v github.com/langgenius/dify-sandbox/tests/integration_tests/...