File size: 643 Bytes
e93b7b1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Use an official Python runtime as the base image
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime AS base
# It is necessary to install git to run the pip install -r requirements.txt
RUN apt-get update && apt-get install -y git
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory in the container
WORKDIR $HOME/app
# Copy the current directory contents into the container at /app
COPY --chown=user . $HOME/app
RUN pip install -r requirements.txt
FROM base AS debug
CMD ["python", "-m", "pdb", "search_engine_model.py"]
FROM base AS run
CMD ["python", "app.py"]
|