File size: 738 Bytes
8772e69
c8de333
8772e69
996160c
 
b3c59a8
996160c
8772e69
 
 
 
 
 
 
 
 
5d5c3c8
 
 
 
8772e69
 
 
 
 
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
# Use an official Python runtime as a parent image
FROM python:3.12.3-slim

# Create the logs directory with appropriate permissions
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
RUN mkdir -p /tmp/outputs && chmod -R 777 /tmp/outputs  # Create /tmp/outputs

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

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

# Ensure proper permissions for the application
RUN chown -R root:root /app
RUN chmod -R 777 /app/logs

# Expose the port the app runs on
EXPOSE 8000

# Run the FastAPI app using Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]