|
|
|
FROM python:3.9-slim |
|
|
|
|
|
RUN pip install --upgrade pip |
|
RUN pip install gradio google-cloud-aiplatform google-auth |
|
|
|
|
|
RUN apt-get update && apt-get install -y curl gnupg |
|
RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-367.0.0-linux-x86_64.tar.gz |
|
RUN tar -xzvf google-cloud-sdk-367.0.0-linux-x86_64.tar.gz |
|
RUN ./google-cloud-sdk/install.sh |
|
|
|
|
|
ENV PATH $PATH:/google-cloud-sdk/bin |
|
|
|
|
|
WORKDIR /app |
|
COPY . /app |
|
|
|
|
|
RUN pip install google-cloud-aiplatform |
|
|
|
|
|
RUN gcloud auth application-default login --no-launch-browser |
|
|
|
|
|
CMD ["python", "app.py"] |
|
|