raygiles3 commited on
Commit
f3135d5
1 Parent(s): f968d79

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -11
Dockerfile CHANGED
@@ -1,11 +1,25 @@
1
- FROM python:3.9
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 . .
10
-
11
- CMD ["python3", "main.py"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]