File size: 1,172 Bytes
2909c70
9dfbe53
2909c70
9dfbe53
 
 
 
 
6d55b2c
 
2909c70
 
6d55b2c
 
 
2909c70
 
64a69fe
d220608
64a69fe
 
d220608
64a69fe
 
d220608
f1bad0b
2909c70
 
 
 
6d55b2c
 
 
 
2909c70
6d55b2c
 
f36a7aa
2909c70
 
6d55b2c
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
38
39
40
41
# 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"]