Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P86478
Dockerfile torch2.6.0+rocm6.1 GPU
Active
Public
Actions
Authored by
gkyziridis
on Dec 9 2025, 2:20 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Tags
Machine-Learning-Team
Referenced Files
F70961790: Dockerfile torch2.6.0+rocm6.1 GPU
Dec 9 2025, 2:20 PM
2025-12-09 14:20:51 (UTC+0)
Subscribers
gkyziridis
# Base image
FROM
docker-registry.wikimedia.org/bookworm:20251207
# Set root user
USER
root
# Proxy build arguments
ENV
http_proxy
=
http://webproxy:8080
ENV
https_proxy
=
http://webproxy:8080
ENV
no_proxy
=
127
.0.0.1,::1,localhost,.wmnet,.wikimedia.org,.wikipedia.org,.wikibooks.org,.wikiquote.org,.wiktionary.org,.wikisource.org,.wikispecies.org,.wikiversity.org,.wikidata.org,.mediawiki.org,.wikinews.org,.wikivoyage.org
# Install dependencies including Python headers
RUN
apt-get update
&&
\
apt-get install -y --no-install-recommends
\
python3.11 python3.11-venv python3.11-distutils python3.11-dev python3-pip
\
build-essential git curl ca-certificates
\
&&
rm -rf /var/lib/apt/lists/*
# Set python3.11 as default python
RUN
update-alternatives --install /usr/bin/python python /usr/bin/python3.11
1
# Create a virtual environment
RUN
python -m venv /opt/venv
ENV
PATH
=
"/opt/venv/bin:
$PATH
"
# Upgrade pip inside venv
RUN
pip install --upgrade pip
# Install PyTorch with ROCm support
# RUN pip install torch==2.9.1+rocm6.1 --index-url https://download.pytorch.org/whl/rocm6.1
RUN
pip install
torch
==
2
.6.0+rocm6.1 --index-url https://download.pytorch.org/whl/rocm6.1
# Install ML packages
RUN
pip install numpy pandas transformers accelerate safetensors datasets
# Set ROCm environment variables
ENV
ROCM_PATH
=
/opt/rocm
ENV
PATH
=
$ROCM_PATH
/bin:
$PATH
ENV
LD_LIBRARY_PATH
=
$ROCM_PATH
/lib:
$ROCM_PATH
/lib64:
$LD_LIBRARY_PATH
# Set working directory
WORKDIR
/workspace
# Default command
CMD
[
"python"
]
# Build
# docker build --network=host -f Dockerfile.gpu -t torch_rocm_gpu .
Event Timeline
gkyziridis
created this paste.
Dec 9 2025, 2:20 PM
2025-12-09 14:20:51 (UTC+0)
gkyziridis
mentioned this in
T410663: Upgrade AMD GPU + torch version of ML Labs machines
.
Dec 9 2025, 2:38 PM
2025-12-09 14:38:12 (UTC+0)
Log In to Comment