Skip to content

DEV: revert docker editting #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .devcontainer/DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM continuumio/miniconda3
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
btop \
cmake \
gdb \
gh \
Expand Down Expand Up @@ -34,21 +33,29 @@ RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUS
# 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 (dev+docs) and fix the bug with VS-code terminal showing 2 conda env prompts
# 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 piqtree python=3.12 -y && \
conda activate piqtree
/opt/conda/bin/conda create -n c312 python=3.12 -y && \
conda activate c312

# Initialise conda for zsh shell
RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.zshrc && \
echo 'alias sac="conda activate"' >> ~/.zshrc && \
echo 'alias sde="conda deactivate"' >> ~/.zshrc
# Initialize conda for zsh shell
RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.zshrc

# Set up conda environments
# 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 piqtree && \
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"]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
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/iqtree/piqtree2:latest
docker push ghcr.io/iqtree/piqtree2:latest
-t ghcr.io/cogent3/piqtree2:latest
docker push ghcr.io/cogent3/piqtree2:latest

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Documentation = "https://piqtree2.readthedocs.io"


[project.optional-dependencies]
dev = ["cibuildwheel", "pybind11", "scriv", "piqtree2[doc]", "piqtree2[test]", "piqtree2[lint]", "piqtree2[typing]"]
dev = ["cibuildwheel", "pybind11", "scriv", "piqtree2[test]", "piqtree2[lint]", "piqtree2[typing]"]
test = ["pytest", "pytest-cov", "nox"]
lint = ["ruff==0.8.2"]
typing = ["mypy==1.13.0", "piqtree2[stubs]", "piqtree2[test]"]
Expand Down
Loading