Spaces:
Runtime error
Runtime error
File size: 632 Bytes
32a637a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM python:3.11
# Inside the container, we'll work from /app. This is just a path.
WORKDIR /app
# Install dependencies first (better layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your source files
COPY . .
# Helpful envs
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
#RUN mkdir -p /data && chmod -R 777 /data
# Expose your port (change if you prefer 8000)
EXPOSE 7860
# Run Uvicorn pointing to your ASGI app in main.py
# Using `python -m uvicorn` is more reliable in containers
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |