File size: 829 Bytes
7403f2c
 
 
 
 
 
ae037a5
 
 
ec0e22d
 
 
be86181
 
 
7403f2c
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use the official Python 3.11 slim image
FROM python:3.11-slim

# Set the working directory inside the container
WORKDIR /app

# Create the generated_charts directory and set permissions
RUN mkdir -p /app/generated_charts && chmod -R 777 /app/generated_charts

# Create the cache directory and set permissions
RUN mkdir -p /app/cache && chmod -R 777 /app/cache

# Create the log file and set permissions
RUN touch /app/pandasai.log && chmod 666 /app/pandasai.log

# Copy the requirements file first
COPY requirements.txt .

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

# Copy the rest of the application code
COPY . .

# Expose port 7860 (required by Hugging Face Spaces)
EXPOSE 7860

# Command to start FastAPI using Uvicorn
CMD ["uvicorn", "controller:app", "--host", "0.0.0.0", "--port", "7860"]