Spaces:
Runtime error
Runtime error
File size: 787 Bytes
ae70948 117ead1 ae70948 2fc13f2 ae70948 7ddc2f8 ae70948 1508cdd ae70948 1508cdd ae70948 1508cdd 117ead1 ae70948 117ead1 bdd6e99 ae70948 |
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 |
# Use a Python base image
FROM python:3.9-slim
# Set environment variables to prevent bytecode generation and buffer output for logging
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /app
# Copy requirements.txt and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install accelerate
COPY model /app/model
# Copy the application code into the container
COPY . .
# Expose the port your application will run on
EXPOSE 7860
# Define the command to run your FastAPI application
CMD ["python", "app.py"] |