File size: 738 Bytes
84f44e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
29
FROM python:3.8

# Install required system dependencies
RUN apt-get update && apt-get install -y libopenblas-dev git curl && rm -rf /var/lib/apt/lists/*

# Set the working directory inside the container
WORKDIR /app

# Copy the requirements file into the container
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Create necessary directories (but don't download models here!)
RUN mkdir -p /app/modelsBioembedSmall /app/models_folder /app/Samples /app/numba_cache /app/hf_cache

# Copy the entire project to the container
COPY . .

# Expose the port for Flask
EXPOSE 7860

# Run the app with Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "-w", "2", "--timeout", "300"]