File size: 607 Bytes
917a5e4
 
 
 
0b960c9
 
 
 
 
917a5e4
 
 
 
a2d357b
 
 
 
 
917a5e4
 
 
 
 
 
 
 
 
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
28
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"]