Add docker files for testing (#761)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
451be8a600
Коммит
b16256fd07
@@ -0,0 +1,49 @@
|
||||
# Use a base image
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Update package list and install prerequisites
|
||||
RUN apt-get update && apt-get install -y \
|
||||
software-properties-common cmake locales git curl \
|
||||
&& add-apt-repository ppa:deadsnakes/ppa \
|
||||
&& apt-get update
|
||||
|
||||
# Allows running git commands in /app
|
||||
RUN git config --global --add safe.directory /app
|
||||
|
||||
# Generate the desired locale
|
||||
RUN locale-gen en_US.UTF-8
|
||||
|
||||
# Install Python 3.10 and pip
|
||||
RUN apt-get install -y python3.10 python3.10-venv python3.10-dev python3-pip libsqlite3-dev
|
||||
|
||||
# Update pip
|
||||
RUN apt remove -y python3-wheel
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
RUN python3.10 get-pip.py
|
||||
RUN python3.10 -m pip install --upgrade pip setuptools wheel
|
||||
|
||||
# Set Python 3.10 as the default python3
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
|
||||
|
||||
# Remove blinker python package
|
||||
RUN apt-get remove -y python3-blinker
|
||||
|
||||
# Install rocm
|
||||
# Define custom version
|
||||
ARG DEB_FILE=""
|
||||
ARG AMDGPU_BUILD=""
|
||||
ARG ROCM_BUILD=""
|
||||
RUN curl -O "https://artifactory-cdn.amd.com/artifactory/list/amdgpu-deb/${DEB_FILE}"
|
||||
RUN apt-get install -y "./${DEB_FILE}"
|
||||
RUN amdgpu-repo --amdgpu-build="${AMDGPU_BUILD}" --rocm-build="compute-rocm-dkms-no-npi-hipclang/${ROCM_BUILD}"
|
||||
RUN DEBIAN_FRONTEND=noninteractive TZ="America/Toronto" amdgpu-install --yes --usecase=rocm
|
||||
|
||||
# Install any dependencies specified in requirements.txt
|
||||
# Run interactive bash shell
|
||||
CMD ["/bin/bash", "-c", "\
|
||||
python3.10 -m pip install -r requirements.txt -r requirements-test.txt \
|
||||
&& exec /bin/bash \
|
||||
"]
|
||||
@@ -0,0 +1,27 @@
|
||||
# Use a base image
|
||||
FROM rocm/dev-ubuntu-22.04
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Update package list and install prerequisites
|
||||
RUN apt-get update && apt-get install -y \
|
||||
software-properties-common cmake locales git \
|
||||
&& add-apt-repository ppa:deadsnakes/ppa \
|
||||
&& apt-get update
|
||||
|
||||
# Allows running git commands in /app
|
||||
RUN git config --global --add safe.directory /app
|
||||
|
||||
# Install Python 3.10 and pip
|
||||
RUN apt-get install -y python3.10 python3.10-venv python3.10-dev python3-pip
|
||||
|
||||
# Set Python 3.10 as the default python3
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
|
||||
|
||||
# Install any dependencies specified in requirements.txt
|
||||
# Run interactive bash shell
|
||||
CMD ["/bin/bash", "-c", "\
|
||||
python3 -m pip install -r docs/sphinx/requirements.txt \
|
||||
&& exec /bin/bash \
|
||||
"]
|
||||
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
customrocmtest: # service name
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/Dockerfile.customrocmtest
|
||||
devices:
|
||||
- /dev/kfd
|
||||
- /dev/dri
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
volumes:
|
||||
- ../:/app
|
||||
- ../../rocprofiler-sdk:/rocprofiler-sdk
|
||||
ports:
|
||||
- 8050:8050
|
||||
tty: true
|
||||
stdin_open: true
|
||||
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
doctest: # service name
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/Dockerfile.doctest
|
||||
devices:
|
||||
- /dev/kfd
|
||||
- /dev/dri
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
volumes:
|
||||
- ../:/app
|
||||
tty: true
|
||||
stdin_open: true
|
||||
Ссылка в новой задаче
Block a user