File size: 1,266 Bytes
b9d7594
c79824c
 
 
 
 
 
bf58b8e
 
 
 
 
 
c79824c
 
 
 
 
 
 
 
 
b9d7594
c79824c
 
 
 
f39814a
 
 
 
 
 
 
 
 
 
 
 
 
c79824c
 
 
 
 
 
 
b9d7594
ec19d1a
c79824c
 
bf58b8e
ec19d1a
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Use Python 3.11 as base image
FROM python:3.11-slim

# -------------------------------
# Set working directory
WORKDIR /app

# Copy all application files
COPY . .

# List files for debugging
RUN ls -la /app

# -------------------------------
# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# -------------------------------
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# -------------------------------
# Optional: Create necessary data directories if not bind-mounted
RUN mkdir -p /app/data/input \
    /app/data/output1 \
    /app/data/output2 \
    /app/data/output3 \
    /app/data/csv_notes_bs \
    /app/data/csv_notes_cfs \
    /app/data/csv_notes_pnl \
    /app/data/output \
    /app/data/output1 \
    /app/data/output2 \
    /app/data/output3 \
    && chmod -R 777 /app/data

# -------------------------------
# Set environment variables
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1

# -------------------------------
# Expose the port
EXPOSE 7860

# -------------------------------
# Start FastAPI app from app.py
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]