Spaces:
Running
Running
File size: 936 Bytes
81437cd 637dba6 81437cd 5377167 637dba6 81437cd 637dba6 81437cd | 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 36 37 | # Hugging Face Spaces requires port 7860
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies:
# libxrender1, libxext6, libgl1, libglib2.0-0 — required by RDKit and OpenCV
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
libxrender1 \
libxext6 \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install tennetsac + all dependencies missing from its PyPI metadata + web framework
# matplotlib, torchaudio, torchvision are in requirements.txt but not declared in PyPI install_requires
RUN pip install --no-cache-dir \
tennetsac \
matplotlib \
torchaudio \
torchvision \
fastapi \
"uvicorn[standard]"
# Copy application source
COPY backend/ ./backend/
COPY frontend/ ./frontend/
EXPOSE 7860
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
|