Skip to content

Commit

Permalink
fix: print path
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleDelliVeneri committed Jul 2, 2024
1 parent 72be030 commit b83fe8b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
cd illustris_python
pip install .
- name: Install required libraries
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-glx
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-glx && sudo find / -name "libEGL.so.1"
- name: Set up Headless Environment
run: export QT_QPA_PLATFORM=offscreen
- name: Run stubtest
Expand Down
58 changes: 58 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Use an official Python runtime as the base image
FROM python:3.12

# Install system dependencies for PyQt6 and OpenGL
RUN apt-get update && apt-get install -y \
python3-dev \
qtbase5-dev \
libqt5gui5 \
libgl1-mesa-glx \
libxkbcommon-x11-0

# Set up a virtual environment
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# Install Python dependencies
COPY requirements.txt requirements.txt
RUN pip install --upgrade pip
# Install Python dependencies
RUN apt-get update && apt-get install -y \
python3-dev \
qtbase5-dev \
libqt5gui5 \
libgl1-mesa-glx \
libxkbcommon-x11-0 \
build-essential \
cmake \
python3-pyqt5 \
libqt5core5a \
python3-sipbuild
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install PyQt6 PyQt6-Qt6 PyQt6-stubs
RUN pip install -r requirements.txt
RUN pip install PyQt6 PyQt6-Qt6 PyQt6-stubs # Install PyQt6 and its stubs
RUN pip install pytest pytest-qt

# Set the working directory within the container
WORKDIR /app

# Install illustris_python (as a submodule or package)
COPY .gitmodules .gitmodules
RUN git submodule update --init --recursive
RUN pip install -e ./illustris_python

# Copy the current directory contents into the container at /app
COPY . .

# Set the display variable
ENV DISPLAY=:99

# Set Qt to run in offscreen mode
ENV QT_QPA_PLATFORM=offscreen

# Command to run when the container starts
CMD ["pytest", "tests"] # Or your specific stubtest command

0 comments on commit b83fe8b

Please sign in to comment.