Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +25 -11
Dockerfile
CHANGED
@@ -1,11 +1,25 @@
|
|
1 |
-
FROM python:3.
|
2 |
-
|
3 |
-
WORKDIR /
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
COPY . .
|
5 |
+
|
6 |
+
RUN pip install -r requirements.txt
|
7 |
+
|
8 |
+
# -----------------------------------------------------------------
|
9 |
+
# Copy certificates to make use of free open ai usage within the lab
|
10 |
+
# REMOVE THIS WHEN DEPLOYING TO CODE ENGINE
|
11 |
+
|
12 |
+
# Copy the self-signed root CA certificate into the container
|
13 |
+
COPY certs/rootCA.crt /usr/local/share/ca-certificates/rootCA.crt
|
14 |
+
|
15 |
+
# Update the CA trust store to trust the self-signed certificate
|
16 |
+
RUN chmod 644 /usr/local/share/ca-certificates/rootCA.crt && \
|
17 |
+
update-ca-certificates
|
18 |
+
|
19 |
+
# Set the environment variable OPENAI_API_KEY to empty string
|
20 |
+
ENV OPENAI_API_KEY=skills-network
|
21 |
+
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
|
22 |
+
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
23 |
+
# -----------------------------------------------------------------
|
24 |
+
|
25 |
+
CMD ["python", "-u", "server.py"]
|