kapllan commited on
Commit
660f9e5
·
verified ·
1 Parent(s): 853a5d2

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +41 -0
Dockerfile ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM --platform=amd64 python:3.10
3
+
4
+ # Set environment variables for Poetry
5
+ ENV POETRY_VERSION=1.4.0 \
6
+ POETRY_HOME="/opt/poetry" \
7
+ POETRY_VIRTUALENVS_CREATE=false \
8
+ POETRY_NO_INTERACTION=1
9
+
10
+ # Install Poetry
11
+ RUN apt-get update && apt-get install -y curl && \
12
+ curl -sSL https://install.python-poetry.org | python3 -
13
+
14
+ # Add Poetry to PATH
15
+ ENV PATH="$POETRY_HOME/bin:$PATH"
16
+
17
+ # Install git
18
+ RUN apt-get update && apt-get install -y git && apt-get clean
19
+
20
+ RUN git clone https://github.com/kapllan/SmartOpinion.git /app
21
+
22
+
23
+ # Set the working directory in the container
24
+ WORKDIR /app
25
+
26
+ # Copy the current directory contents into the container at /app
27
+ # COPY . /app
28
+
29
+ # Install any dependencies specified in requirements.txt
30
+ RUN pip install poetry
31
+ RUN poetry lock
32
+ RUN poetry install
33
+ RUN poetry run task setup
34
+ # RUN pip install vllm==0.6.3
35
+
36
+ # Expose the port that Gradio will run on
37
+ EXPOSE 7860
38
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
39
+
40
+ # Define the command to run the Gradio app
41
+ CMD ["python", "app.py"]