Skip to content

Commit 3c85187

Browse files
Merge pull request #4 from akochari/main
Minor rearrangement to fit Serve requirements
2 parents b56cc0f + c411741 commit 3c85187

File tree

5 files changed

+11
-25
lines changed

5 files changed

+11
-25
lines changed

.github/workflows/build-ptp.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
env:
3333
REGISTRY: ghcr.io
34-
IMAGE_NAME: 'ptp'
34+
IMAGE_NAME: ${{ github.repository }}
3535
#DOCKER_USER: ${{ secrets.DOCKER_USER }}
3636
#DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
3737
working-directory: ./ptp
@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
# list of Docker images to use as base name for tags
7171
images: |
72-
ghcr.io/pharmbio/ptp
72+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7373
# generate Docker tags based on the following events/attributes
7474
tags: |
7575
type=schedule

ptp/Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ FROM djangobase AS djangoapp
3030
COPY . /app/
3131

3232
WORKDIR /app
33-
34-
33+
RUN mkdir /app/inference/models/
3534

3635
# Expose the port the Django app runs on
3736
EXPOSE 8000
@@ -41,16 +40,16 @@ RUN useradd -u 1000 $USER
4140
RUN chown -R $USER:$USER /etc/supervisor/conf.d/supervisord.conf
4241
RUN chown -R $USER:$USER /app/
4342
RUN chown -R $USER:$USER /var/log/supervisor/
44-
RUN chmod +x /app/start-single.sh
43+
RUN chmod +x /app/start-script.sh
4544
RUN chmod +x /app/start-django.sh
46-
RUN chmod +x /app/download.sh
4745

4846
# Make sure the container is running as non-root
4947
USER $USER
5048

5149
ENV CELERY_BROKER_URL="redis://localhost:6379/0"
5250
ENV REDIS_URL="redis://localhost:6379/0"
53-
ENV DOWNLOAD=false
51+
ENV MODEL_DIR = "/app/inference/models/models"
52+
# Models will be downloaded and placed in /app/inference/models/models through SciLifeLab Serve interface
5453

5554
# Start supervisord
56-
CMD ["sh", "-c", "/app/start-single.sh"]
55+
CMD ["sh", "-c", "/app/start-script.sh"]

ptp/download.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

ptp/start-script.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
sh -c /app/start-django.sh
4+
supervisord -c /etc/supervisor/conf.d/supervisord.conf

ptp/start-single.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)