Skip to content

Commit

Permalink
Use Docker to setup development environment
Browse files Browse the repository at this point in the history
  • Loading branch information
vedithal-amd committed Dec 17, 2024
1 parent 8019721 commit 59f0385
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update

# 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

# Set Python 3.10 as the default python3
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1

# Copy your application code to the container
COPY . .

# Install any dependencies specified in requirements.txt
RUN pip3 install --no-cache-dir -r requirements.txt -r requirements-test.txt

# Command to run your application
CMD ["/bin/bash"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ from the `amd-mainline` branch, while new features are developed in our

Users may checkout `amd-staging` to preview upcoming features.

## Testing

To quickly get the environment for building and testing in a bash shell, you can run `docker compose run app`

## How to Cite

This software can be cited using a Zenodo
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
app:
build: .
devices:
- /dev/kfd
- /dev/dri
security_opt:
- seccomp:unconfined

0 comments on commit 59f0385

Please sign in to comment.