Spaces:
Sleeping
Sleeping
Red-tech-hub
commited on
Commit
•
5fd37fc
1
Parent(s):
83f4e66
[update] docker image
Browse files- Dockerfile +3 -36
Dockerfile
CHANGED
@@ -1,52 +1,19 @@
|
|
1 |
-
|
2 |
-
FROM centos:7
|
3 |
|
4 |
-
# Set bash as the default shell
|
5 |
-
SHELL ["/bin/bash", "-c"]
|
6 |
-
|
7 |
-
# Update system packages and install required development tools
|
8 |
-
RUN yum -y update && \
|
9 |
-
yum groupinstall -y "Development Tools" && \
|
10 |
-
yum install -y openssl-devel bzip2-devel libffi-devel zlib-devel gcc wget epel-release.noarch openssl11-devel
|
11 |
-
|
12 |
-
# Download and extract Python 3.12.3 source code
|
13 |
-
RUN wget https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tgz && \
|
14 |
-
tar -xzf Python-3.12.3.tgz
|
15 |
-
|
16 |
-
# Compile and install Python 3.12.3
|
17 |
-
WORKDIR Python-3.12.3
|
18 |
-
RUN sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
|
19 |
-
./configure --enable-optimizations && \
|
20 |
-
make altinstall
|
21 |
-
|
22 |
-
# Cleanup
|
23 |
-
RUN yum clean all && \
|
24 |
-
rm -rf /var/cache/yum && \
|
25 |
-
rm -rf Python-3.12.3.tgz
|
26 |
-
|
27 |
-
# Set environment variables for Python and pip
|
28 |
-
ENV PATH="/usr/local/bin:${PATH}"
|
29 |
-
ENV LD_LIBRARY_PATH "/usr/local/lib:$LD_LIBRARY_PATH"
|
30 |
-
|
31 |
-
# Your application setup follows...
|
32 |
WORKDIR /code
|
33 |
|
34 |
-
# Copy requirements file
|
35 |
COPY ./requirements.txt /code/requirements.txt
|
36 |
|
37 |
-
# Install dependencies
|
38 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
39 |
|
40 |
-
# Copy application files
|
41 |
COPY ./zephyr-7b-beta.Q4_K_S.gguf /code/zephyr-7b-beta.Q4_K_S.gguf
|
42 |
COPY ./nomic-embed-text-v1.5.Q4_K_S.gguf /code/nomic-embed-text-v1.5.Q4_K_S.gguf
|
43 |
|
44 |
COPY ./data/ /code/data/
|
45 |
-
COPY
|
46 |
|
47 |
COPY ./titleGenerator.py /code/titleGenerator.py
|
48 |
COPY ./run.py /code/run.py
|
49 |
COPY ./server.py /code/server.py
|
50 |
|
51 |
-
|
52 |
-
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
FROM python:3.11
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /code
|
4 |
|
|
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
|
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
|
|
9 |
COPY ./zephyr-7b-beta.Q4_K_S.gguf /code/zephyr-7b-beta.Q4_K_S.gguf
|
10 |
COPY ./nomic-embed-text-v1.5.Q4_K_S.gguf /code/nomic-embed-text-v1.5.Q4_K_S.gguf
|
11 |
|
12 |
COPY ./data/ /code/data/
|
13 |
+
COPY ./chroma_db /code/chroma_db
|
14 |
|
15 |
COPY ./titleGenerator.py /code/titleGenerator.py
|
16 |
COPY ./run.py /code/run.py
|
17 |
COPY ./server.py /code/server.py
|
18 |
|
19 |
+
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|