File size: 490 Bytes
696ce04 |
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 |
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime AS base
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
# This label is used for testing purposes.
FROM base AS debug
CMD ["python", "-m", "pdb", "test_image_classification.py"]
# This label is used to run the gradio server.
FROM base AS run
CMD ["python", "app.py"]
|