11# centOS
22FROM nvidia/cuda:11.1.1-devel-ubi8
33
4- # Enable AppStream and install Python 3.9
4+ # Enable AppStream and install Python 3.9 and git
55RUN yum -y module enable python39 && \
66 yum install -y python39-3.9.2 && \
77 yum install -y python39-devel-3.9.2 && \
8+ yum install -y git && \
89 yum clean all && \
910 (python3.9 --version || echo "Python installation failed" && exit 1)
1011
@@ -21,7 +22,11 @@ WORKDIR /app
2122# Install dependencies
2223RUN pip3 install --no-cache-dir torch==1.9.0 torchvision==0.10.0 cuda-python==11.1.1
2324
24- COPY ./pytorch_connectomics /app/pytorch_connectomics
25+ # Download pytorch_connectomics at specific commit (version 1.0)
26+ RUN git clone https://github.com/zudi-lin/pytorch_connectomics.git /app/pytorch_connectomics && \
27+ cd /app/pytorch_connectomics && \
28+ git checkout 20ccfde
29+
2530COPY ./samples_pytc /app/samples_pytc
2631COPY ./server_pytc /app/server_pytc
2732COPY ./server_api /app/server_api
@@ -35,9 +40,10 @@ WORKDIR /app/server_api
3540RUN pip3 install --no-cache-dir -r requirements.txt
3641
3742WORKDIR /app
38- # Copies the startup script , and runs it at CMD
43+ # Copies the startup scripts , and runs it at CMD
3944COPY ./start.sh /app/
40- RUN chmod +x start.sh
45+ COPY ./setup_pytorch_connectomics.sh /app/
46+ RUN chmod +x start.sh setup_pytorch_connectomics.sh
4147
4248# Expose ports
4349EXPOSE 4242 4243 4244 6006
0 commit comments