File size: 1,120 Bytes
e491165
 
66f8fc1
f9c9a48
 
e491165
 
 
 
 
 
66f8fc1
e491165
 
 
66f8fc1
 
 
 
56069ce
446f43f
 
56069ce
 
 
 
 
446f43f
66f8fc1
f2fa40a
 
e84ad1b
 
 
e491165
 
 
480ed09
 
 
d8c7126
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 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"]