Spaces:
Running
Running
FROM python:3.10-slim | |
WORKDIR /app | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
build-essential \ | |
sqlite3 \ | |
libffi-dev \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Copy requirements first for better caching | |
COPY requirements.txt . | |
# Install Python dependencies | |
RUN pip install --no-cache-dir --upgrade pip && \ | |
pip install --no-cache-dir -r requirements.txt && \ | |
pip install --no-cache-dir libsql-experimental==0.0.49 libsql-client==0.2.0 | |
# Copy the rest of the application | |
COPY . . | |
# Set environment variables | |
ENV PORT=7860 | |
# Print installed packages for debugging | |
RUN pip list | grep libsql && \ | |
pip list | grep argon2 | |
# Use the PORT environment variable in the CMD | |
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port $PORT"] | |