Spaces:
Configuration error
Configuration error
File size: 626 Bytes
e36010a 4d2a31a e36010a 4d2a31a e36010a ceacbdf e36010a 4d2a31a |
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 |
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV HF_HOME=/code/.cache/huggingface
ENV TRANSFORMERS_CACHE=/code/.cache/huggingface
# Set work directory
WORKDIR /code
# Install system dependencies
RUN apt-get update && apt-get install -y build-essential
# Install Python dependencies
COPY requirements.txt /code/
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . /code/
# Expose port
EXPOSE 7860
RUN mkdir -p /code/.cache/huggingface && chmod -R 777 /code/.cache
# Run the app
CMD ["python", "app.py"]
|