geminiClone / Dockerfile
raidAthmaneBenlala's picture
Update Dockerfile
19de6af verified
Raw
History Blame Contribute Delete
931 Bytes
# Use Python 3.9 Slim (Debian-based, standard for Hugging Face)
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# 1. Install Build Tools (CRITICAL)
# We install 'cmake' and 'build-essential'.
# This allows the AI engine to build itself correctly for THIS specific computer.
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# 2. Install Python Libraries
# We install llama-cpp-python normally.
# Because we installed 'cmake' above, this will build successfully in about 3 minutes.
RUN pip install --no-cache-dir \
llama-cpp-python \
langchain \
langchain-community \
streamlit \
huggingface-hub
# Copy the application files
COPY . .
# Expose the port
EXPOSE 7860
# Run the app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]