Zaki / Dockerfile
alibidaran's picture
Update Dockerfile
f36a7aa verified
# Base image for Python
FROM python:3.11.9-alpine3.20
# Just for sure everything will be fine.
# ALSO ITS BAD! But since its docker, probably.. screw it?
USER root
# Installing gcc compiler and main library.
RUN apk update && apk add wget build-base python3-dev musl-dev linux-headers
RUN CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
# Install Ollama server
# Set working directory for the app
RUN mkdir app
COPY . /app
RUN chmod -R 777 /app
WORKDIR /app
# Install Ollama
#RUN curl https://ollama.ai/install.sh | sh
# Create the directory and give appropriate permissions
#RUN mkdir -p /.ollama && chmod 777 /.ollama
# Ensure Ollama binary is in the PATH
#ENV PATH="/app/venv/bin:/root/.ollama/bin:$PATH"
# Copy application files and model
COPY . /app
# Install Python dependencies
RUN mkdir -p /.cache/huggingface/hub -m 777
RUN mkdir -p /.config/matplotlib -m 777
RUN chmod -R 777 /.cache
RUN chmod -R 777 /.config
# Updating pip and installing everything from requirements
RUN python3 -m pip install -U pip setuptools wheel
RUN python3 -m pip install gradio
# Run the start_services.sh script
CMD ["python","app.py"]