Spaces:
Runtime error
Runtime error
File size: 875 Bytes
0ad3564 3b444d0 0ad3564 3b444d0 0ad3564 3b444d0 0ad3564 3b444d0 0ad3564 3b444d0 0ad3564 3b444d0 a25982b 0ad3564 | 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 | FROM python:3.11-slim
# Install system utilities, compilation tools, and PostgreSQL libraries
RUN apt-get update && apt-get install -y \
curl \
gcc \
build-essential \
python3-dev \
libpq-dev \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Copy dependencies first to maximize layer caching efficiency
COPY requirements.txt .
# Upgrade pip and install the requirements file
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy everything else from your root folder
COPY . .
# Environment settings required for Django/Gunicorn runtime
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
# Enforce execution permissions on the entrypoint script
RUN chmod +x setup.sh
EXPOSE 7860
CMD ["./setup.sh"] |