Spaces:
Runtime error
Runtime error
# Use an official Python runtime as the base image | |
FROM python:3.8-apache | |
# Set environment variables | |
ENV NUMBA_DISABLE_JIT=1 | |
ENV PYTHONDONTWRITEBYTECODE 1 | |
ENV PYTHONUNBUFFERED 1 | |
# Set the working directory in the container | |
WORKDIR /app | |
# Copy the Django project code into the container | |
COPY . /app | |
# Install OpenCV dependencies | |
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 libxrender-dev libgl1-mesa-glx | |
# Copy the requirements file to the working directory | |
COPY requirements.txt . | |
# Install project dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Collect static files | |
RUN python manage.py collectstatic --noinput | |
# Expose the port your Django app will run on | |
EXPOSE 80 | |
# Start Apache when the container starts | |
CMD ["apache2-foreground"] | |