File size: 669 Bytes
6b556be 0b5f282 6b556be 0b5f282 6b556be 0b5f282 6b556be 0b5f282 6b556be 0b5f282 6b556be 0b5f282 6b556be 0b5f282 5f0874f 6b556be | 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 | FROM python:3.11
WORKDIR /code
# Copy requirements file first for better caching
COPY requirements.txt /code/requirements.txt
# Install dependencies
RUN pip install --no-cache-dir -r /code/requirements.txt
# Copy application code
COPY app /code/app
# Set proper permissions for app files
RUN chmod -R 755 /code/app
# Create directories for matplotlib to use
RUN mkdir -p /tmp/matplotlib && chmod 777 /tmp/matplotlib
# Ensure models directory exists and has proper permissions
RUN mkdir -p /code/app/models && chmod 755 /code/app/models
# Expose the port
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "7860"] |