Skip to content

Commit ed45667

Browse files
authored
Merge pull request #94 from ajcwebdev/staging
Railway Deploy Successful
2 parents 7a3f190 + be6d3b7 commit ed45667

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.github/Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,19 @@ FROM base
6666
COPY --from=ollama /bin/ollama /usr/local/bin/ollama
6767
COPY --from=ollama /root/.ollama /root/.ollama
6868

69-
# Create content directory
70-
RUN mkdir -p content
69+
ENV WHISPER_FORCE_CPU=1
70+
ENV WHISPER_NO_GPU=1
7171

72-
# Set proper permissions
73-
# RUN chown -R node:node /usr/src/app
72+
# Create content directory first
73+
RUN mkdir -p /usr/src/app/content
7474

75-
# Use non-root user
76-
# USER node
75+
# Set proper permissions for the entire app directory including content
76+
RUN chown -R node:node /usr/src/app && \
77+
chmod -R 755 /usr/src/app && \
78+
chmod 777 /usr/src/app/content # Ensure content dir is fully writable
79+
80+
# Switch to non-root user
81+
USER node
7782

7883
EXPOSE 3000
7984
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]

src/transcription/whisper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ const runWhisperCpp: WhisperRunner = async (finalPath, whisperModel) => {
8282

8383
// Run whisper.cpp on the WAV file
8484
await execPromise(
85-
`./whisper.cpp/build/bin/whisper-cli ` +
85+
`./whisper.cpp/build/bin/whisper-cli --no-gpu ` +
8686
`-m "whisper.cpp/models/${modelGGMLName}" ` +
8787
`-f "${finalPath}.wav" ` +
88-
`-of "${finalPath}" ` +
89-
`--output-lrc`
88+
`-of "${finalPath}" ` + // Output file base name
89+
`--output-lrc` // Make sure there is a space before the next flag
9090
)
9191
l.success(`\n Transcript LRC file successfully created:\n - ${finalPath}.lrc`)
9292

0 commit comments

Comments
 (0)