ImageClassification / Dockerfile
DanielIglesias97's picture
First upload of the code for the ImageClassification demo.
696ce04
raw
history blame contribute delete
490 Bytes
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"]