forked from OpenRouterTeam/openrouter-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (40 loc) · 1.25 KB
/
Dockerfile
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
FROM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04
ARG DEBIAN_FRONTEND=noninteractive
# Set the workdir in the docker container
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
libjpeg-dev \
libblas-dev \
liblapack-dev \
libatlas-base-dev \
libsqlite3-dev \
lzma \
liblzma-dev \
libbz2-dev \
git \
wget
# Download and install Python 3.10
RUN wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz && \
tar -xf Python-3.10.0.tgz && \
cd Python-3.10.0 && \
./configure --enable-optimizations --enable-loadable-sqlite-extensions && \
make && make install
# Install pip for Python 3.10
RUN python3.10 -m ensurepip --upgrade && \
python3.10 -m pip install --no-cache-dir --upgrade pip
# Copy requirements.txt from your project folder and install Python dependencies
COPY requirements.txt .
RUN pip3.10 install --no-cache-dir -r requirements.txt
RUN pip3.10 install db-sqlite3
# Copy the current directory contents into the container at /app
COPY . .
# Expose the port uWSGI will listen on
EXPOSE 8000
# Run the application:
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]