aibom-generator / Dockerfile
a1c00l's picture
Update Dockerfile
0b960c9 verified
raw
history blame
607 Bytes
FROM python:3.10-slim
WORKDIR /app
# This ensures models are cached properly and don’t re-download every time
RUN mkdir /.cache && chmod 777 /.cache
ENV TRANSFORMERS_CACHE=/.cache
ENV HF_HOME=/.cache
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application files (including setup.py)
COPY . /app
# Install the package in development mode
RUN pip install -e .
# Set environment variables
ENV PYTHONPATH=/app
# Create entrypoint script
RUN chmod +x /app/entrypoint.sh
# Command to run the application
ENTRYPOINT ["/app/entrypoint.sh"]