File size: 1,339 Bytes
660f9e5
7a96a15
660f9e5
 
0156111
 
 
 
660f9e5
 
 
 
 
 
0156111
660f9e5
 
 
 
fc6b9ff
 
2a196e8
 
 
 
bd2ecc9
42c0fbd
fc6b9ff
6e1d10c
 
 
fc6b9ff
 
660f9e5
fc6b9ff
 
2ad279d
660f9e5
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
44
45
46
47
48
49
50
51
# Use an official Python runtime as a parent image
FROM --platform=linux python:3.10

# Set environment variables for Poetry
ENV POETRY_VERSION=1.4.0 \
    POETRY_HOME="/opt/poetry" \
    POETRY_VIRTUALENVS_CREATE=false \
    POETRY_NO_INTERACTION=1

# Install Poetry
RUN apt-get update && apt-get install -y curl && \
    curl -sSL https://install.python-poetry.org | python3 -

# Add Poetry to PATH
ENV PATH="$POETRY_HOME/bin:$PATH"

# Install git
RUN apt-get update && apt-get install -y git && apt-get clean

RUN git clone https://github.com/kapllan/SmartOpinion.git /app

# Create and set permissions for the logs directory
RUN mkdir -p /app/logs && chmod -R 777 /app/logs

# Set the Hugging Face cache environment variable
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
ENV TRANSFORMERS_CACHE=/app/cache

RUN chmod -R 777 /app/models
RUN chmod -R 777 /app/data

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
# COPY . /app

# Install any dependencies specified in requirements.txt
RUN pip install poetry
RUN poetry lock
RUN poetry install
RUN poetry run task setup
# RUN pip install vllm==0.6.3

# Expose the port that Gradio will run on
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"

# Define the command to run the Gradio app
CMD ["python", "app.py"]