Files
boc/projects/landvex/vision/Dockerfile
T

33 lines
682 B
Docker
Raw Normal View History

FROM pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime
WORKDIR /app
# Systemberoenden
RUN apt-get update && apt-get install -y \
tesseract-ocr \
tesseract-ocr-swe \
tesseract-ocr-eng \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Python-paket
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Kopiera kod
COPY modeller/ ./modeller/
COPY traening/ ./traening/
COPY embeddings/ ./embeddings/
COPY dataset/ ./dataset/
# Miljövariabler
ENV PYTHONPATH=/app
ENV VISION_MODEL_DIR=/models
ENV VISION_DATASET_DIR=/data/dataset
VOLUME ["/models", "/data"]
# Default: träna
CMD ["python3", "-m", "traening.trainer"]