Spaces:
Paused
Paused
Delete Dockerfile
Browse files- Dockerfile +0 -36
Dockerfile
DELETED
|
@@ -1,36 +0,0 @@
|
|
| 1 |
-
FROM python:3.10-slim
|
| 2 |
-
|
| 3 |
-
# Install system dependencies required for building llama-cpp-python
|
| 4 |
-
RUN apt-get update && apt-get install -y \
|
| 5 |
-
build-essential \
|
| 6 |
-
curl \
|
| 7 |
-
cmake \
|
| 8 |
-
git \
|
| 9 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
-
|
| 11 |
-
# Set user configuration for HF Spaces
|
| 12 |
-
RUN useradd -m -u 1000 user
|
| 13 |
-
USER user
|
| 14 |
-
ENV HOME=/home/user \
|
| 15 |
-
PATH=/home/user/.local/bin:$PATH \
|
| 16 |
-
PYTHONUNBUFFERED=1 \
|
| 17 |
-
HF_HOME=/home/user/.cache/huggingface
|
| 18 |
-
|
| 19 |
-
WORKDIR $HOME/app
|
| 20 |
-
|
| 21 |
-
# Pre-create and chown the cache directory to prevent permission issues
|
| 22 |
-
RUN mkdir -p $HF_HOME && chown -R user:user $HF_HOME
|
| 23 |
-
|
| 24 |
-
# Install Python requirements
|
| 25 |
-
COPY --chown=user requirements.txt .
|
| 26 |
-
# Install standard dependencies first
|
| 27 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 28 |
-
|
| 29 |
-
# Copy application files
|
| 30 |
-
COPY --chown=user . .
|
| 31 |
-
|
| 32 |
-
# Expose the port HF Spaces expects
|
| 33 |
-
EXPOSE 7860
|
| 34 |
-
|
| 35 |
-
# Run the API server
|
| 36 |
-
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|