Skip to content

Commit

Permalink
revert DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
M0stafaRady authored Dec 4, 2023
1 parent d9d94ad commit 2d40cc6
Showing 1 changed file with 15 additions and 37 deletions.
52 changes: 15 additions & 37 deletions cocotb/caravel_cocotb/docker/DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ RUN apt-get update && \
libglib2.0-dev\
gperf

# Upgrade pip
RUN pip3 install --upgrade pip

# Install Python packages using pip
RUN pip3 install --upgrade\
cocotb \
cocotb_coverage \
cocotb-bus \
coverage \
loremipsum \
oyaml \
prettytable \
anytree\
caravel-cocotb

# Install Verilator from source v5.012
RUN git clone https://github.com/verilator/verilator && \
cd verilator && \
Expand Down Expand Up @@ -85,45 +100,8 @@ ENV PATH="/opt/riscv/bin:${PATH}"
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Create a non-root user
RUN useradd -ms /bin/bash myuser

# Set the working directory
WORKDIR /app

# Copy the application code
COPY . /app

# Change ownership to the non-root user
RUN chown -R myuser:myuser /app

# Switch to the non-root user
USER myuser


# Upgrade pip
RUN pip3 install --upgrade pip

# Install Python packages using pip
RUN pip3 install --upgrade\
cocotb \
cocotb_coverage \
cocotb-bus \
coverage \
loremipsum \
oyaml \
prettytable \
anytree\
caravel-cocotb


USER root
ENV PATH /home/myuser/.local/bin:$PATH

# Add any additional setup or changes here

USER myuser

# Default command when the container starts
CMD ["bash"]

0 comments on commit 2d40cc6

Please sign in to comment.