syntaxhacker
fix: switch preciz dependency to main branch (cli-sdk no longer exists)
25ecf85
Raw
History Blame Contribute Delete
732 Bytes
FROM python:3.11-slim
RUN apt-get update -qq && apt-get install -y -qq git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements and install dependencies (as root)
COPY requirements.txt .
COPY scripts/ scripts/
RUN pip install --no-cache-dir -r requirements.txt && \
python -c "import site; import shutil; shutil.copy('scripts/utils_shim.py', f'{site.getsitepackages()[0]}/utils.py')" && \
rm -rf scripts
# Copy application code
COPY app/ app/
COPY prompts/ prompts/
RUN useradd -m -u 1000 user && chown -R user:user /app
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Expose HF Space port
EXPOSE 7860
# Run the FastAPI application
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]