File size: 725 Bytes
d919708 419f982 d919708 b527ff3 7b25dd3 bb3c951 a53cb38 bb3c951 a53cb38 d919708 efa9887 7b200fc 0487d89 ab0aad3 b527ff3 7b25dd3 1b86d8a d919708 fbbbd2c 419f982 1b86d8a 7b25dd3 ab0aad3 1b86d8a efa9887 0487d89 |
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 |
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
chromium-driver \
git \
gcc \
libc-dev \
ffmpeg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Update pip
RUN pip install --upgrade pip
RUN pip install packaging torch==2.4.1
# Copy requirements.txt and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create /data directory with correct permissions
RUN mkdir -p /data && chmod -R 755 /data
# Copy all project files
COPY . .
# Verify files in /app
RUN ls -R /app
# Expose port 7860 for FastAPI
EXPOSE 7860
# Run the FastAPI app
CMD ["python", "main.py"]
|