tox21-classifier / Dockerfile
sk16er's picture
Update Dockerfile
19facee verified
raw
history blame contribute delete
628 Bytes
# Change from python:3.9-slim to 3.11
FROM python:3.11-slim
# Install system dependencies for RDKit
RUN apt-get update && apt-get install -y \
libxrender1 \
libxext6 \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create checkpoints directory
RUN mkdir -p checkpoints
# Expose port (Hugging Face Spaces default)
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]