Skip to content
Open
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
41 changes: 41 additions & 0 deletions .devcontainer/dev-ubuntu24.04_rocm7.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use ROCm build container on Ubuntu 24.04 as base
ARG ROCM_VERSION="7.0.2"
FROM rocm/dev-ubuntu-24.04:${ROCM_VERSION}-complete
ENV ROCM_VERSION="${ROCM_VERSION}"

# Copy uv into image
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Ensure system packages are up to date and install dependencies
RUN << 'EOF'
apt-get update
apt-get -y full-upgrade
apt-get install -y libglib2.0-0 \
git \
libegl1 \
libfontconfig1 \
libxkbcommon-x11-0 \
libdbus-1-3 \
libopengl0
apt-get clean && rm -rf /var/lib/apt/lists/*
EOF

# Set up Python virtual environment and upgrade pip and setuptools
USER ubuntu
WORKDIR /home/ubuntu

RUN curl -fsSL https://claude.ai/install.sh | bash

# Ensure the installed binary is on the `PATH`
ENV PATH="/home/ubuntu/.local/bin/:$PATH"

ENV VIRTUAL_ENV="/home/ubuntu/venv"
RUN uv venv $VIRTUAL_ENV --python 3.11
RUN uv pip install --no-cache-dir --upgrade pip setuptools wheel
RUN uv pip install --no-cache-dir --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm7.0

ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# This is a supposed fix to help with gfx1151
# See: https://github.com/pytorch/pytorch/issues/164346
ENV HSA_OVERRIDE_GFX_VERSION="11.0.0"
40 changes: 40 additions & 0 deletions .devcontainer/dev-ubuntu24.04_rocm7.0/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Dev Ubuntu 24.04 ROCm 7.0",
"build": {
"dockerfile": "Dockerfile"
},
"postCreateCommand": "uv pip install --no-cache-dir -r requirements.txt && uv pip --no-cache-dir install -e .[test,md] && uv pip install notebook xarray",
"postStartCommand": "nohup bash -c 'jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token='' --no-browser > nohup.out &'",
"forwardPorts": [
8888
],

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"anthropic.claude-code",
"ms-python.pylint",
"eamodio.gitlens",
"usernamehw.errorlens",
"ms-azuretools.vscode-docker"
]
}
},
"runArgs": ["--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--device=/dev/kfd",
"--device=/dev/dri",
"--group-add=video",
"--ipc=host",
"--shm-size",
"8G"]

}
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "PySlice"
version = "0.1.0"
description = "PyTorch based package for EELS calculations"
readme = "README.md"
requires-python = ">=3.12"
requires-python = ">=3.11"
dependencies = [
"ase",
"dataclasses",
Expand All @@ -19,8 +19,9 @@ dependencies = [

[project.optional-dependencies]
fast = ["torch","torchvision"]
test = ["abtem>=1.0.6"]
test = ["abtem>=1.0.6", "pytest"]
md = ["orb-models"]
fairchem = ["fairchem-core"]

[project.urls]
Homepage = "https://github.com/h-walk/PySlice"
Expand Down
1 change: 0 additions & 1 deletion src/pyslice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
from .multislice.trajectory import *
from .postprocessing.haadf_data import *
from .postprocessing.tacaw_data import *
from .postprocessing.testtools import *
Loading