Spaces:
Runtime error
Runtime error
File size: 903 Bytes
e317f5b 10bd6ea e317f5b 10bd6ea e317f5b 10bd6ea 6bd30a2 2ff2b3c 6bd30a2 2ff2b3c e317f5b |
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 |
FROM python:3.10-slim
# Install system dependencies, including git
RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Create cache and model directories with proper permissions
RUN mkdir -p /app/cache/huggingface && chmod -R 777 /app/cache/huggingface
RUN mkdir -p /app/gpt-oss-20b && chmod -R 777 /app/gpt-oss-20b
# Set environment variables for Hugging Face cache
ENV HF_HOME=/app/cache/huggingface
ENV HUGGINGFACE_HUB_CACHE=/app/cache/huggingface/hub
ENV HF_HUB_ENABLE_HF_TRANSFER=1
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port for the API
EXPOSE 8000
# Command to run the application
CMD ["python", "app.py"] |