File size: 1,040 Bytes
96b54eb
0d54d8d
 
 
 
09d5757
 
 
 
 
0d54d8d
 
e35ae84
0d54d8d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
32
33
34
35
36
37
#PYHON VSERSION
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/*
# Fix distutils / setuptools wheel build issue
RUN apt-get update && apt-get install -y python3-distutils
RUN pip install --upgrade pip
RUN pip install "setuptools<66.0.0"
ENV SETUPTOOLS_USE_DISTUTILS=stdlib

# Set environment variables to avoid cache write errors
ENV HF_HOME=/app/hf_cache
ENV NUMBA_CACHE_DIR=/app/numba_cache
ENV NUMBA_DISABLE_CACHING=1

# 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
RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples /app/numba_cache /app/hf_cache

# Copy the entire project to the container
COPY . .

# Expose the port for Gunicorn
EXPOSE 7860

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