forked from iqtree/piqtree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: ensure unix line endings (artefact from initial windows develo…
…pment)
- Loading branch information
Showing
11 changed files
with
768 additions
and
768 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 |
---|---|---|
@@ -1,64 +1,64 @@ | ||
FROM continuumio/miniconda3 | ||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
gdb \ | ||
gh \ | ||
git \ | ||
zsh \ | ||
sudo \ | ||
wget \ | ||
libeigen3-dev \ | ||
libboost-all-dev \ | ||
binutils \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# Set up a non-root user with sudo | ||
RUN useradd -ms /bin/zsh user && echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user | ||
USER user | ||
WORKDIR /home/user/repos | ||
# Install Oh My Zsh | ||
RUN sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" "" --unattended | ||
# Install zsh autosuggestions | ||
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | ||
# Install zsh syntax highlighting | ||
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | ||
# Configure zsh | ||
RUN sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/' ~/.zshrc | ||
# Create a new conda environment with Python 3.12 and fix the bug with VS-code terminal showing 2 conda env prompts | ||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda config --set auto_activate_base False && \ | ||
/opt/conda/bin/conda create -n c312 python=3.12 -y && \ | ||
conda activate c312 | ||
# Initialize conda for zsh shell | ||
RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.zshrc | ||
# Clone cogent3 using SSH | ||
WORKDIR /home/user/repos | ||
RUN git clone --branch develop https://github.com/cogent3/cogent3.git /home/user/repos/cogent3 | ||
# Install pybind11 in the conda environment | ||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate c312 && \ | ||
pip install pybind11 | ||
# Install the cogent3 repository | ||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate c312 && \ | ||
cd /home/user/repos/cogent3 && \ | ||
pip install -e . | ||
# Set up zsh as the default shell | ||
SHELL ["/bin/zsh", "-c"] | ||
# Set zsh as the default shell for the container | ||
FROM continuumio/miniconda3 | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
gdb \ | ||
gh \ | ||
git \ | ||
zsh \ | ||
sudo \ | ||
wget \ | ||
libeigen3-dev \ | ||
libboost-all-dev \ | ||
binutils \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set up a non-root user with sudo | ||
RUN useradd -ms /bin/zsh user && echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user | ||
|
||
USER user | ||
WORKDIR /home/user/repos | ||
|
||
# Install Oh My Zsh | ||
RUN sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" "" --unattended | ||
|
||
# Install zsh autosuggestions | ||
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | ||
|
||
# Install zsh syntax highlighting | ||
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | ||
|
||
# Configure zsh | ||
RUN sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/' ~/.zshrc | ||
|
||
# Create a new conda environment with Python 3.12 and fix the bug with VS-code terminal showing 2 conda env prompts | ||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda config --set auto_activate_base False && \ | ||
/opt/conda/bin/conda create -n c312 python=3.12 -y && \ | ||
conda activate c312 | ||
|
||
# Initialize conda for zsh shell | ||
RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.zshrc | ||
|
||
# Clone cogent3 using SSH | ||
WORKDIR /home/user/repos | ||
RUN git clone --branch develop https://github.com/cogent3/cogent3.git /home/user/repos/cogent3 | ||
|
||
# Install pybind11 in the conda environment | ||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate c312 && \ | ||
pip install pybind11 | ||
|
||
# Install the cogent3 repository | ||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate c312 && \ | ||
cd /home/user/repos/cogent3 && \ | ||
pip install -e . | ||
|
||
# Set up zsh as the default shell | ||
SHELL ["/bin/zsh", "-c"] | ||
|
||
# Set zsh as the default shell for the container | ||
CMD [ "zsh" ] |
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
{ | ||
"name": "piqtree2 devcontainer", | ||
"image": "ghcr.io/cogent3/piqtree2:latest", | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/zsh", | ||
"terminal.integrated.profiles.linux": { | ||
"zsh": { | ||
"path": "zsh" | ||
} | ||
}, | ||
"python.defaultInterpreterPath": "/home/user/.conda/envs/c312/bin/python" | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-toolsai.jupyter", | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-vscode.makefile-tools", | ||
"charliermarsh.ruff", | ||
"njpwerner.autodocstring", | ||
"github.vscode-github-actions", | ||
"tamasfe.even-better-toml", | ||
"DavidAnson.vscode-markdownlint", | ||
"be5invis.toml", | ||
"mhutchie.git-graph" | ||
] | ||
} | ||
}, | ||
"remoteUser": "user", | ||
"postCreateCommand": "sudo chown -R user:user /home/user/.ssh && git config --global --add safe.directory ${containerWorkspaceFolder}" | ||
{ | ||
"name": "piqtree2 devcontainer", | ||
"image": "ghcr.io/cogent3/piqtree2:latest", | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/zsh", | ||
"terminal.integrated.profiles.linux": { | ||
"zsh": { | ||
"path": "zsh" | ||
} | ||
}, | ||
"python.defaultInterpreterPath": "/home/user/.conda/envs/c312/bin/python" | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-toolsai.jupyter", | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-vscode.makefile-tools", | ||
"charliermarsh.ruff", | ||
"njpwerner.autodocstring", | ||
"github.vscode-github-actions", | ||
"tamasfe.even-better-toml", | ||
"DavidAnson.vscode-markdownlint", | ||
"be5invis.toml", | ||
"mhutchie.git-graph" | ||
] | ||
} | ||
}, | ||
"remoteUser": "user", | ||
"postCreateCommand": "sudo chown -R user:user /home/user/.ssh && git config --global --add safe.directory ${containerWorkspaceFolder}" | ||
} |
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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
name: Build and Push Docker Image to ghcr | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .devcontainer/DockerFile | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to GitHub Container Registry | ||
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u cogent3 --password-stdin | ||
|
||
- name: Build and Push Base Docker image | ||
run: | | ||
docker build -f .devcontainer/DockerFile . \ | ||
-t ghcr.io/cogent3/piqtree2:latest | ||
docker push ghcr.io/cogent3/piqtree2:latest | ||
name: Build and Push Docker Image to ghcr | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .devcontainer/DockerFile | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to GitHub Container Registry | ||
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u cogent3 --password-stdin | ||
|
||
- name: Build and Push Base Docker image | ||
run: | | ||
docker build -f .devcontainer/DockerFile . \ | ||
-t ghcr.io/cogent3/piqtree2:latest | ||
docker push ghcr.io/cogent3/piqtree2:latest | ||
Oops, something went wrong.