psychec / Dockerfile
ejschwartz's picture
users
f2fa40a
# Build on top of the psychec type inference Docker image
FROM ghcr.io/edmcman/psychec-typeinference-docker:original
USER root
# Install Python and pip
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
# Create a virtual environment and install dependencies
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Set home to the user's home directory
ENV HOME=/home/vscode \
PATH=/home/vscode/.local/bin:/opt/venv/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=vscode . $HOME/app
USER vscode
# Disable buffering to allow logging of standard output.
ENV PYTHONUNBUFFERED=1
# Expose the port Gradio runs on
EXPOSE 7860
# Clear the inherited ENTRYPOINT from the base image to allow CMD to run as the main process
ENTRYPOINT [""]
CMD ["python3", "main.py"]