Skip to content

Commit 0cf7dfd

Browse files
author
ashwinvis
committed
Add Dockerfile to reproduce the build
1 parent 46dc426 commit 0cf7dfd

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
venv/
23+
env/
24+
ENV/
25+
26+
# Testing
27+
.pytest_cache/
28+
.coverage
29+
htmlcov/
30+
.tox/
31+
32+
# IDE
33+
.vscode/
34+
.idea/
35+
*.swp
36+
*.swo
37+
*~
38+
39+
# Git
40+
.git/
41+
.gitignore
42+
43+
# Mercurial
44+
.hg/
45+
.hgignore
46+
.hgtags
47+
48+
# Documentation
49+
doc/
50+
docs/
51+
*.md
52+
!README.md
53+
54+
# Other
55+
.DS_Store
56+
*.log

plugins/fluidfft-hipfft/Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
FROM docker.io/rocm/dev-ubuntu-24.04:latest
2+
3+
# Set working directory
4+
WORKDIR /workspace
5+
6+
# Install system dependencies
7+
RUN apt update && apt install -y \
8+
pkg-config \
9+
cmake \
10+
libfftw3-dev \
11+
hipfft-dev \
12+
python3-venv \
13+
python3-dev \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Copy the fluidfft repository
17+
COPY . /workspace/
18+
19+
# Create virtual environment
20+
RUN python3 -m venv /opt/venv
21+
22+
# Set environment to use the virtual environment
23+
ENV PATH="/opt/venv/bin:$PATH"
24+
25+
# Upgrade pip
26+
RUN pip install --upgrade pip
27+
28+
# Install Python build dependencies
29+
RUN pip install \
30+
meson-python \
31+
numpy \
32+
cython \
33+
transonic \
34+
pytest
35+
36+
# Install fluidfft-builder
37+
RUN pip install -e /workspace/plugins/fluidfft-builder
38+
39+
# Install base fluidfft package
40+
RUN pip install /workspace
41+
42+
# Install fluidfft-hipfft plugin with HIP compiler
43+
RUN cd /workspace/plugins/fluidfft-hipfft && \
44+
CC=hipcc \
45+
CXX=hipcc \
46+
CMAKE_PREFIX_PATH=/opt/rocm-7.1.1 \
47+
pip install .
48+
49+
# Set environment variables for runtime
50+
ENV CC=hipcc
51+
ENV CXX=hipcc
52+
ENV CMAKE_PREFIX_PATH=/opt/rocm-7.1.1
53+
54+
# Verify installation
55+
RUN python -c "import fluidfft_hipfft.fft2d.with_hipfft; print('Plugin installed successfully')"
56+
57+
# Default command
58+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)