File size: 1,113 Bytes
bf782fe
 
4c6b097
 
bf782fe
4c6b097
 
 
 
 
044218e
bf782fe
 
1868007
4d0c124
bf782fe
4d0c124
fd185bd
9b2ea52
 
 
fd185bd
 
 
 
4d0c124
bf782fe
4d0c124
1868007
 
 
6e6a780
 
 
ffeea77
 
 
77ee5dc
ffeea77
 
1868007
7dab601
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
42
# FROM intelligencenoborders/scinobo-citance-analysis:v0.1.0

# Stage 1: Authenticate to Docker registry
FROM alpine:latest AS docker-login

RUN apk add --no-cache docker-cli

# Use BuildKit secrets for secure credential handling
RUN --mount=type=secret,id=DOCKER_USERNAME,required=true \
    --mount=type=secret,id=DOCKER_PASSWORD,required=true \
    echo "$(cat /run/secrets/DOCKER_PASSWORD)" | docker login -u "$(cat /run/secrets/DOCKER_USERNAME)" --password-stdin registry.hub.docker.com

FROM intelligencenoborders/inobo:citance_analysis_scibert

# Copy files
# COPY download_model.py /app

RUN useradd -m -u 1000 user

RUN chown -R user /app

USER user
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

# Run the download
# RUN python /app/download_model.py

# Set the working directory in the container
WORKDIR /app/src

# Expose the port that Gradio will run on
EXPOSE 7860

ENV PYTHONUNBUFFERED=1 \
	GRADIO_ALLOW_FLAGGING=never \
	GRADIO_NUM_PORTS=1 \
	GRADIO_SERVER_NAME=0.0.0.0 \
	SYSTEM=spaces

# Run app.py when the container launches
CMD ["python", "-m", "citance_analysis.server.gradio_app"]