-
-
Save kevinmelodi/d7cdab518299062d5e7ca2170f432832 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You may need to specify the --platform depending on cloud provider | |
FROM --platform=linux/amd64 python:3.9 | |
# Copy requirements first | |
COPY requirements.txt . | |
# Next, copy in the .env file, which contains the PRODIGY_KEY variable | |
COPY .env . | |
# Install everything | |
RUN python -m pip install --upgrade pip && \ | |
python -m pip install -r requirements.txt && \ | |
export $(cat .env) && \ | |
python -m pip install prodigy -f https://####@download.prodi.gy && \ | |
apt-get update && \ | |
apt-get install -y poppler-utils | |
# Copy the rest in, keeping .dockerignore in mind | |
COPY . . | |
# Set some environment variables | |
ENV PRODIGY_LOGGING="VERBOSE" | |
ENV PRODIGY_BASIC_AUTH_USER="" | |
ENV PRODIGY_BASIC_AUTH_PASS="" | |
ENV GOOGLE_APPLICATION_CREDENTIALS=" | |
ENV PRODIGY_ALLOWED_SESSIONS "" | |
# Copy the service account key into the container | |
RUN mkdir -p /app/secrets | |
COPY #### /app/secrets/ | |
# Expose the port number appropriate for cloud vendor | |
EXPOSE 8080 | |
CMD ["bash", "run.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment