Skill-assessment / Dockerfile
Muhammad541's picture
Update Dockerfile
d4592e6 verified
raw
history blame
435 Bytes
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
COPY ./data /data
# Create a writable cache directory
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Set environment variables for huggingface_hub and transformers
ENV HF_HOME=/app/cache
ENV TRANSFORMERS_CACHE=/app/cache
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]