File size: 937 Bytes
cb8303f
cf856fa
cb8303f
47d79de
 
 
cf856fa
 
e47a0a3
cb8303f
 
 
cf856fa
e47a0a3
47d79de
cf856fa
 
47d79de
e47a0a3
 
a7ba255
 
47d79de
cb8303f
e47a0a3
cf856fa
 
 
cb8303f
e47a0a3
 
cb8303f
e47a0a3
cb8303f
 
e47a0a3
47d79de
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
38
# Use an official Python runtime as a base image
FROM python:3.10

# Set environment variables
ENV TRANSFORMERS_CACHE=/app/cache \
    HF_HOME=/app/cache \
    DEBIAN_FRONTEND=noninteractive \
    CMAKE_ARGS="-DGGML_CUDA=OFF"

# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
      libgomp1 \
      build-essential \
      cmake \
    && rm -rf /var/lib/apt/lists/*

# Prepare cache directory
RUN mkdir -p /app/cache && chmod -R 777 /app/cache

# Copy requirements and install Python packages
COPY requirements.txt .

# Upgrade pip and install packages
RUN pip install --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# Copy application code and data
COPY app.py cv_embeddings.json cv_text.txt ./

# Expose the port your FastAPI app runs on
EXPOSE 7860

# Launch
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]