Spaces:
Runtime error
Runtime error
# CUDA-enabled base image | |
FROM nvidia/cuda:11.8.0-base-ubuntu20.04 | |
# Set environment variables | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV PYTHONUNBUFFERED=1 | |
# Install required system packages | |
RUN apt-get update && apt-get install -y \ | |
python3 python3-pip git wget unzip && \ | |
rm -rf /var/lib/apt/lists/* | |
# Set the working directory | |
WORKDIR /app | |
# Copy the application files | |
COPY . . | |
# Set Hugging Face cache directory | |
ENV TRANSFORMERS_CACHE=/app/cache | |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache | |
# Create directories with proper read/write permissions | |
RUN mkdir -p /app/uploads/vectors && \ | |
chmod -R 777 /app/uploads | |
# Install Python dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Expose the Flask app's port | |
EXPOSE 7860 | |
# Start the Flask app | |
CMD ["python3", "run.py"] | |