Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerization for Consistent Artifact Generation #325

Open
Myrausman opened this issue Nov 27, 2024 · 0 comments
Open

Containerization for Consistent Artifact Generation #325

Myrausman opened this issue Nov 27, 2024 · 0 comments

Comments

@Myrausman
Copy link
Member

To improve the consistency, reproducibility, and ease of deployment for the riscv-opcodes project, I propose containerizing the project using Docker. Containerization will ensure that the environment for generating artifacts such as encoding.h, LaTeX tables, and other outputs is consistent across different development, testing, and production environments.

Proposed Solution:

# Use an official Python runtime as a parent image
ARG PYTHON_VERSION=3.9-slim
FROM python:${PYTHON_VERSION}

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install additional dependencies
RUN apt-get update && apt-get install -y \
    make \
    git \
    cpp \
    && rm -rf /var/lib/apt/lists/*

# Configure Git to treat the directory as safe
RUN git config --global --add safe.directory /app
# Install Python dependencies
RUN pip install --no-cache-dir pre-commit coverage

# Run pre-commit to ensure code quality
RUN pre-commit run --all-files

# Default command to run the parse.py script
CMD ["./parse.py", "-pseudo", "-c", "-go", "-chisel", "-sverilog", "-rust", "-latex", "-spinalhdl", "rv*", "unratified/rv*"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant