Update Dockerfile
Browse files- Dockerfile +26 -26
Dockerfile
CHANGED
@@ -1,42 +1,42 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
|
7 |
|
8 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# # Set the environment variables
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
|
15 |
# # Install Poetry
|
16 |
# # RUN pip install --user poetry tiktoken==0.4.0 fastapi==0.95.1 uvicorn==0.22.0 httpx==0.24.0 socksio==1.0.0
|
17 |
-
|
18 |
|
19 |
# # Expose the port the app runs on
|
20 |
-
|
21 |
|
22 |
-
|
23 |
|
24 |
# RUN poetry install --only main && \
|
25 |
# chown -R 1000:0 /root/.local/bin/poetry && \
|
26 |
# chmod +x claude_to_chatgpt/app.py
|
27 |
|
28 |
-
#
|
29 |
-
|
30 |
-
|
31 |
-
FROM wtzeng/claude-to-chatgpt:latest
|
32 |
-
|
33 |
-
# WORKDIR /app
|
34 |
-
|
35 |
-
EXPOSE 7860
|
36 |
-
|
37 |
-
ENV PORT="7860"
|
38 |
-
|
39 |
-
# RUN mkdir -p /.cache && \
|
40 |
-
# chmod -R 777 /.cache
|
41 |
-
|
42 |
-
# CMD ["poetry", "run", "python", "claude_to_chatgpt/app.py"]
|
|
|
1 |
+
FROM python:3.9-slim-buster
|
2 |
|
3 |
+
RUN apt-get update && \
|
4 |
+
apt-get install -y git
|
5 |
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
|
8 |
+
# Switch to the "user" user
|
9 |
+
USER user
|
10 |
+
|
11 |
+
# Set home to the user's home directory
|
12 |
+
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
+
|
15 |
+
RUN git clone https://github.com/jtsang4/claude-to-chatgpt.git $HOME/app
|
16 |
+
|
17 |
+
# Set the working directory to the user's home directory
|
18 |
+
WORKDIR $HOME/app
|
19 |
+
|
20 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
21 |
+
COPY --chown=user . $HOME/app
|
22 |
|
23 |
# # Set the environment variables
|
24 |
+
ENV CLAUDE_BASE_URL="https://api.anthropic.com"
|
25 |
+
ENV LOG_LEVEL="info"
|
26 |
+
ENV PORT="7860"
|
27 |
|
28 |
# # Install Poetry
|
29 |
# # RUN pip install --user poetry tiktoken==0.4.0 fastapi==0.95.1 uvicorn==0.22.0 httpx==0.24.0 socksio==1.0.0
|
30 |
+
RUN pip install --user poetry
|
31 |
|
32 |
# # Expose the port the app runs on
|
33 |
+
EXPOSE 7860
|
34 |
|
35 |
+
RUN poetry install --only main
|
36 |
|
37 |
# RUN poetry install --only main && \
|
38 |
# chown -R 1000:0 /root/.local/bin/poetry && \
|
39 |
# chmod +x claude_to_chatgpt/app.py
|
40 |
|
41 |
+
# Set the command to run the application
|
42 |
+
CMD ["poetry", "run", "python", "claude_to_chatgpt/app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|