Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start from the ROCm base image
FROM rocm/rocm-terminal:5.4.2
# Start from the latest ROCm base image
FROM rocm/dev-ubuntu-22.04:6.0-complete

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -12,26 +12,25 @@ RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*

# Set the working directory in the container
WORKDIR /app
# Set up a new user
RUN useradd -m -s /bin/bash user
USER user
WORKDIR /home/user/app

# Copy the requirements file into the container
COPY requirements.txt .
# Set up Python environment
ENV PATH="/home/user/.local/bin:${PATH}"
RUN python3 -m pip install --user --upgrade pip

# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
COPY --chown=user:user requirements.txt .

# Copy the application code
COPY src /app/src
COPY examples /app/examples
RUN pip install --user --no-cache-dir -r requirements.txt

# Create a directory for the model
RUN mkdir -p /app/models
# Copy the application code
COPY --chown=user:user . /home/user/app/

# Set an argument for the model path
ARG MODEL_PATH
ENV MODEL_PATH=${MODEL_PATH}

# Set the entry point to run the inference script
ENTRYPOINT ["python3", "src/run_inference.py"]

ENTRYPOINT ["python3", "src/run_inference.py"]