|
FROM python:3.9-slim-buster |
|
|
|
RUN apt-get update && \ |
|
apt-get install -y git |
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
|
|
RUN git clone https://github.com/SimFG/claude-to-chatgpt.git $HOME/app |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
ENV CLAUDE_BASE_URL="https://api.anthropic.com" |
|
ENV LOG_LEVEL="info" |
|
ENV PORT=7860 |
|
|
|
|
|
RUN pip install --user poetry |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
RUN poetry install --only main |
|
|
|
|
|
CMD ["poetry", "run", "python", "claude_to_chatgpt/app.py"] |