-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add python base and ubuntu base image
- Loading branch information
Showing
13 changed files
with
379 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ target | |
Cargo.lock | ||
.idea | ||
target | ||
*.csv | ||
*.csv | ||
/spring-data-examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# https://developer.okta.com/blog/2022/04/22/github-actions-graalvm | ||
name: Native CI | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
permissions: | ||
contents: read | ||
jobs: | ||
pipeline: | ||
name: flickr2 native pipeline | ||
runs-on: ${{ matrix.os }} | ||
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')" | ||
timeout-minutes: 90 | ||
env: | ||
SPRING_OUTPUT_ANSI_ENABLED: DETECT | ||
SPRING_JPA_SHOW_SQL: false | ||
JHI_DISABLE_WEBPACK_LOGS: true | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-2019] | ||
graalvm-version: ['22.0.0.2'] | ||
java-version: ['11'] | ||
include: | ||
- os: ubuntu-latest | ||
executable-suffix: '' | ||
native-build-args: --verbose -J-Xmx10g | ||
- os: macos-latest | ||
executable-suffix: '' | ||
native-build-args: --verbose -J-Xmx13g | ||
- os: windows-2019 | ||
executable-suffix: '.exe' | ||
# e2e is disabled due to unstable docker step | ||
e2e: false | ||
native-build-args: --verbose -J-Xmx10g | ||
steps: | ||
# OS customizations that allow the builds to succeed on Linux and Windows. | ||
# Using hash for better security due to third party actions. | ||
- name: Set up swap space | ||
if: runner.os == 'Linux' | ||
# v1.0 (49819abfb41bd9b44fb781159c033dba90353a7c) | ||
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c | ||
with: | ||
swap-size-gb: 10 | ||
- name: | ||
Configure pagefile | ||
# v1.2 (7e234852c937eea04d6ee627c599fb24a5bfffee) | ||
uses: al-cheb/configure-pagefile-action@7e234852c937eea04d6ee627c599fb24a5bfffee | ||
if: runner.os == 'Windows' | ||
with: | ||
minimum-size: 10GB | ||
maximum-size: 12GB | ||
- name: Set up pagefile | ||
if: runner.os == 'Windows' | ||
run: | | ||
(Get-CimInstance Win32_PageFileUsage).AllocatedBaseSize | ||
shell: pwsh | ||
- name: 'SETUP: docker' | ||
run: | | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker | ||
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components | ||
open -a /Applications/Docker.app --args --unattended --accept-license | ||
#echo "We are waiting for Docker to be up and running. It can take over 2 minutes..." | ||
#while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done | ||
if: runner.os == 'macOS' | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.14.0 | ||
- name: Set up GraalVM (Java ${{ matrix.java-version }}) | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '${{ matrix.graalvm-version }}' | ||
java-version: '${{ matrix.java-version }}' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Cache Maven dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-maven | ||
- name: Cache npm dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install node.js packages | ||
run: npm install | ||
- name: 'E2E: Package' | ||
run: npm run native-package -- -B -ntp "-Dnative-build-args=${{ matrix.native-build-args }}" | ||
- name: 'E2E: Prepare' | ||
if: matrix.e2e != false | ||
run: npm run ci:e2e:prepare | ||
- name: 'E2E: Run' | ||
if: matrix.e2e != false | ||
run: npm run native-e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# on: [push] | ||
# name: test-docker | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: ./Dockerfile_Github | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/rust_template:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# https://github.com/marketplace/actions/github-action-for-graalvm | ||
name: GraalVM Native Image builds | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: FoodTrucksBackend on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: '21' | ||
distribution: 'graalvm' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
- name: Step Show Envs | ||
run: | | ||
echo "GRAALVM_HOME: $GRAALVM_HOME" | ||
echo "JAVA_HOME: $JAVA_HOME" | ||
java --version | ||
native-image --version | ||
- name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html | ||
run: mvn -Pnative package | ||
# - name: Example step using Gradle plugin # https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html | ||
# run: gradlew nativeCompile | ||
- name: Upload binary | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: foodTruck-${{ matrix.os }} | ||
path: foodTruck* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# on: [push] | ||
# name: test-docker | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: ./Dockerfile_Github | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/rust_template:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,7 @@ build/ | |
### VS Code ### | ||
.vscode/ | ||
target | ||
meilisearch-react-demo | ||
meilisearch-react-demo | ||
|
||
|
||
todo.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM gakaki/base | ||
|
||
RUN apt-get install -y wget bzip2 | ||
RUN wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh | ||
RUN bash Anaconda3-2023.09-0-Linux-x86_64.sh -b | ||
RUN rm Anaconda3-5.0.1-Linux-x86_64.sh | ||
ENV PATH /root/anaconda3/bin:$PATH | ||
|
||
RUN conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/ \ | ||
&& conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/ \ | ||
&& conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/ \ | ||
&& conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/ \ | ||
&& conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/ \ | ||
&& conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/ \ | ||
&& conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/ | ||
|
||
RUN conda update conda | ||
RUN conda update anaconda | ||
RUN conda update --all | ||
|
||
RUN mkdir /opt/notebooks | ||
RUN jupyter notebook --generate-config --allow-root | ||
RUN echo "c.NotebookApp.password = u'sha1:6a3f528eec40:6e896b6e4828f525a6e20e5411cd1c8075d68619'" >> /root/.jupyter/jupyter_notebook_config.py | ||
|
||
EXPOSE 8888 | ||
|
||
CMD ["jupyter", "notebook", "--allow-root", "--notebook-dir=/opt/notebooks", "--ip='*'", "--port=8888", "--no-browser"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ubuntu:latest | ||
# ubuntu 安装 php 依赖 | ||
# ubuntu 安装 python 依赖 | ||
# Docker 时区调整方案 | ||
|
||
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list \ | ||
&& sed -i 's/cn.archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list \ | ||
&& sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list \ | ||
&& sed -i 's/ports.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list | ||
|
||
## locales | ||
RUN apt-get update -y && apt upgrade -y && apt-get dist-upgrade -y && apt-get install -y tzdata locales && rm -rf /var/lib/apt/lists/* \ | ||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
ENV LANG en_US.utf8 | ||
# Docker 时区调整方案 | ||
## timezone | ||
ENV TZ=Asia/Shanghai \ | ||
DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get install -y tzdata \ | ||
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ | ||
&& echo ${TZ} > /etc/timezone \ | ||
&& dpkg-reconfigure --frontend noninteractive tzdata \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update -y && apt-get install -y build-essential \ | ||
automake git make bison flex gcc patch autoconf subversion locate vim \ | ||
libncursesw5-dev libgdbm-dev libc6-dev \ | ||
libsqlite3-dev tk-dev \ | ||
libssl-dev openssl libcurl4-openssl-dev \ | ||
libffi-dev \ | ||
libxpm-dev libxext-dev \ | ||
zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev \ | ||
libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev \ | ||
liblzma-dev libffi-dev libc6-dev \ | ||
libxml2-dev libpcre3-dev \ | ||
libjpeg-dev libpng-dev libmhash-dev libmhash2 \ | ||
libmcrypt-dev libxslt1-dev \ | ||
libpq-dev libpq5 \ | ||
libglib2.0-0 | ||
# glib2.0 not find in current ubunt docer latest | ||
CMD ["/bin/bash"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.